Comments (9)
Try this and see
test('using both client and the server', function(done, server, client) {
server.eval(function() {
Posts.find().observe({
added: addedNewPost
});
function addedNewPost(post) {
emit('post', post);
}
emit('ready')
}).once('post', function(post) {
assert.equal(post.title, 'hello title');
done();
}).once('ready', function() {
client.eval(function() {
Posts.insert({title: 'hello title'});
});
});
});
OR
test('using both client and the server', function(done, server, client) {
server.evalSync(function() {
Posts.find().observe({
added: addedNewPost
});
function addedNewPost(post) {
emit('post', post);
}
emit('return');
})
server.once('post', function(post) {
assert.equal(post.title, 'hello title');
done();
});
client.eval(function() {
Posts.insert({title: 'hello title'});
});
});
from laika.
I've the same issue here. The two other solutions doesn't seem to work either for me.
I also tried on another example (user authorization), with the same results.
from laika.
The code you provide, works for me. Can you please tell me bit about your env.
Try updating laika too.
from laika.
Good news : I think it's linked with the node version I'm using. The error currently occurs with node 0.10.10. I tried to switch to 0.10.4 (I'm using homebrew on os x), the tests are now working (even the original test)
It would be interesting to know if anyone also has the same issue with the same node version.
from laika.
hmmm. Interesting.
BTW: you got it fixed. That's the best part :)
On Sat, Jun 15, 2013 at 1:13 AM, Twark [email protected] wrote:
Good news : I think it's linked with the node version I'm using. The error
currently occurs with node 0.10.10. I tried to switch to 0.10.4 (I'm using
homebrew on os x), the tests are now working (even the original test)
It would be interesting to know if anyone also has the same issue with the
same node version.—
Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-19477577
.
Arunoda Susiripala
@arunoda http://twitter.com/arunoda
http://gplus.to/arunodahttps://github.com/arunoda
http://www.linkedin.com/in/arunoda
from laika.
Yes I am using node 0.10.10 too. I tried the solutions above, and I tried in a different login and with hello-laika.
@Twark thanks for tracking it down. I'll go back to node 0.10.4 I guess
from laika.
On node v0.10.11 (using homebrew on osx) doesn't gives timeout.
from laika.
There are some issues working with following node versions. upgrade to something else (prefer latest)
- 0.10.8
- 0.10.9
- 0.10.10
from laika.
I'am getting same error, my environment details as follows
node -v
v0.10.24
laika -v
0.3.1
from laika.
Related Issues (20)
- Can you add a publish-subscribe test example using laika
- error: File not found: client/meteor-suite-client.js
- Adding Client-side Helpers Within PhantomJS HOT 1
- Only Partial Mocha Support? HOT 1
- Save output of mocha reporter to file
- Fiber error on startup
- Codeship Phantom error
- Laika destroys dates when passed using eval HOT 1
- Cannot file module .meteor/release/[email protected] HOT 11
- How to pass start parameters to Laika? IP Binding Issues HOT 1
- Can't run Hello World sample on Nitrous with Meteor 0.9.2.2 HOT 4
- Delay before running tests HOT 2
- Integrate with Velocity HOT 1
- Laika doesn't work with velocity tests. HOT 1
- Prevent installing with mrt HOT 3
- Hangs on loading phantomjs... HOT 5
- Getting error during installation . HOT 6
- passing --settings
- console logging
- laika couldn't run in meteor app HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laika.