GithubHelp home page GithubHelp logo

Comments (9)

arunoda avatar arunoda commented on July 20, 2024

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.

Twark avatar Twark commented on July 20, 2024

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.

arunoda avatar arunoda commented on July 20, 2024

The code you provide, works for me. Can you please tell me bit about your env.
Try updating laika too.

from laika.

Twark avatar Twark commented on July 20, 2024

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.

arunoda avatar arunoda commented on July 20, 2024

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.

hoolymama avatar hoolymama commented on July 20, 2024

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.

snize avatar snize commented on July 20, 2024

On node v0.10.11 (using homebrew on osx) doesn't gives timeout.

from laika.

arunoda avatar arunoda commented on July 20, 2024

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.

pradeepmogi avatar pradeepmogi commented on July 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.