javascript - Error using karma with Coffeescript: JSON.stringify cyclic structure serialization -


why getting error running karma coffeescript?

$ karma run warn [watcher]: pattern "/home/yang/reactive.coffee/test/mock/**/*.js" not match file. warn [watcher]: pattern "/home/yang/reactive.coffee/src/**/*.js" not match file. phantomjs 1.9 (linux) error         typeerror: json.stringify cannot serialize cyclic structures.         @ http://localhost:8080/socket.io/socket.io.js:1066 phantomjs 1.9 (linux): executed 0 of 0 error (0.212 secs / 0 secs) phantomjs 1.9 (linux) error         typeerror: json.stringify cannot serialize cyclic structures.         @ http://localhost:8080/socket.io/socket.io.js:1066 phantomjs 1.9 (linux): executed 0 of 0 error (0.212 secs / 0 secs) 

it happens when switch firefox:

firefox 20.0 (linux) error         typeerror: cyclic object value         @ http://localhost:8081/socket.io/socket.io.js:1066 

when switch js cs, error goes away.

more details - let me know if there's else can provide helpful:

$ karma --version karma version: 0.8.5  $ tree src src └── reactive.coffee  0 directories, 1 file  $ tree test test └── spec     └── test_reactive.js  1 directory, 1 file  $ cat karma.conf.js // karma configuration  // base path, used resolve files , exclude basepath = '';  // list of files / patterns load in browser files = [   jasmine,   jasmine_adapter,   'src/*.coffee',   'src/**/*.js',   'test/mock/**/*.js',   'test/spec/**/*.js' ];  // list of files exclude exclude = [];  // test results reporter use // possible values: dots || progress || growl reporters = ['progress'];  // web server port port = 8080;  // cli runner port runnerport = 9100;  // enable / disable colors in output (reporters , logs) colors = true;  // level of logging // possible values: log_disable || log_error || log_warn || log_info || log_debug loglevel = log_info;  // enable / disable watching file , executing tests whenever file changes autowatch = false;  // start these browsers, available: // - chrome // - chromecanary // - firefox // - opera // - safari (only mac) // - phantomjs // - ie (only windows) browsers = ['phantomjs'];  // if browser not capture in given timeout [ms], kill capturetimeout = 10000;  // continuous integration mode // if true, capture browsers, run tests , exit singlerun = false; 

although i'm not sure why cs cause , js wouldn't, play around solution presented on here.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -