arunoda / laika

testing framework for meteor
http://arunoda.github.io/laika/
MIT License
242 stars 38 forks source link

discover-meteor-microscope #103

Open nadolny opened 10 years ago

nadolny commented 10 years ago

Congratulations for your great work. Can you help me understand this question?

File used in my test: https://github.com/arunoda/discover-meteor-microscope/blob/master/tests/posts.js

laika --version 0.3.8 meteor --version 0.7.1.1 mongodb --version 2.4.8

Running the sample line "assert.equal(posts.length, 1);" always fault... posts.length = 0 Whats the problem here?

injecting laika... loading phantomjs... loading initial app pool...

Post Method â without login (1944ms) 1) with login

1 passing (4s) 1 failing

1) Post Method with login: Uncaught AssertionError: 0 == 1 at ServerConnector. (...microscope-03-02-14/tests/posts.js:62:11) at ServerConnector.EventEmitter.emit (events.js:95:17) at DtfParser. .../lib/node_modules/laika/lib/connectors/server.js:33:17) at DtfParser.EventEmitter.emit (events.js:95:17) at /usr/local/lib/node_modules/laika/lib/dtf_parser.js:24:12 at Array.forEach (native) at DtfParser.parse (/usr/local/lib/node_modules/laika/lib/dtf_parser.js:22:9) at Socket.onClientData .../lib/node_modules/laika/lib/connectors/server.js:21:12) at Socket.EventEmitter.emit (events.js:95:17) at Socket. (_stream_readable.js:746:14)

cleaning up injected code

$ ...

nadolny commented 10 years ago

Replacing line //var posts = Posts.find({title: 'google'}).fetch(); var posts = Posts.find().fetch(); Test it´s ok

Parameter {title: 'google'} create the problem?

injecting laika... loading phantomjs... loading initial app pool...

Post Method â without login (1848ms) â with login (2284ms)

2 passing (4s)

cleaning up injected code