1

My tests run fine in my OS X environment, but when I run them on my ubuntu (EC2) server, the tests fail with:

✖ 1 of 40 tests failed:
1) AccountController "before each" hook:
 Error: done() invoked with non-Error: [object Object]
  at CompoundServer.<anonymous> (/usr/lib/node_modules/mocha/lib/runnable.js:198:38)
  at CompoundServer.EventEmitter.emit (events.js:95:17)
  at CompoundServer.initCompound (/home/ubuntu/TeamCity/buildAgent/work/1d2dd0b199edbe3f/node_modules/compound/lib/compound.js:133:14)
  at CompoundServer.initCompoundServer [as init] (/home/ubuntu/TeamCity/buildAgent/work/1d2dd0b199edbe3f/node_modules/compound/lib/server/compound.js:53:29)
  at /home/ubuntu/TeamCity/buildAgent/work/1d2dd0b199edbe3f/node_modules/compound/lib/compound.js:62:18
  at process._tickCallback (node.js:415:13)

All i'm doing is running mocha test/*. Could this possibly be caused by a difference in compoundjs or node.js? On my mac where it is working i'm on v0.8.22, on the ubuntu server it's v0.10.5. Likewise compound version on ubuntu is 1.1.7-1, while on mac (working) is 1.1.6.

Michael
  • 891
  • 2
  • 16
  • 32
  • Looks like a version issue with compoundjs. Upgrading to compound 1.1.7-1 on my mac and now having the same issue. Do I need to regenerate the controllers...etc? Or is there a fix i can add to the tests? – Michael May 19 '13 at 21:37

1 Answers1

0

Looks like an issue with the app being generated by a previous version of compound. Changing this line on my generated test

compound.on('ready', done);

to

compound.on('ready', function() {
      done();
  });

Fixed the problem.

Michael
  • 891
  • 2
  • 16
  • 32