Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Tests fail #3

Open
danmilon opened this issue Oct 25, 2012 · 5 comments
Open

Tests fail #3

danmilon opened this issue Oct 25, 2012 · 5 comments

Comments

@danmilon
Copy link

$ npm test

> [email protected] test /home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook
> mocha


  ․․․․․․․․pass.json 196
[email protected] 9839
[email protected] 5887
logo.png 2322
icon.png 4573
strip.png 2800
[email protected] 2892
manifest.json 391
signature 3334
․․․․․․․․․

  ✖ 2 of 17 tests failed:

  1) Passbook generated should be a valid ZIP:
     Error: done() called multiple times
      at multiple (/usr/lib/node_modules/mocha/lib/runnable.js:152:31)
      at done (/usr/lib/node_modules/mocha/lib/runnable.js:158:26)
      at Zip.Runnable.run.duration (/usr/lib/node_modules/mocha/lib/runnable.js:174:9)
      at Zip.EventEmitter.emit (events.js:90:17)
      at null.<anonymous> (/home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook/lib/zip.js:39:9)
      at EventEmitter.emit (events.js:90:17)
      at WriteStream.flush (fs.js:1517:12)
      at Object.oncomplete (fs.js:297:15)

  2) Passbook generated should contain a signature:

  AssertionError: false == true
      at /home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook/test/passbook_test.js:153:9
      at ChildProcess.exithandler (child_process.js:544:7)
      at ChildProcess.EventEmitter.emit (events.js:96:17)
      at maybeClose (child_process.js:638:16)
      at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
      at Socket.EventEmitter.emit (events.js:93:17)
      at Socket._destroy.destroyed (net.js:357:10)
      at process.startup.processNextTick.process._tickCallback (node.js:244:9)


npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

First error is reasonable. at this test a streams response is piped to the done function.

About the second one, probably its because it tries to execute the signpass program, which is distributed by Apple and is OSX only.

@assaf
Copy link
Owner

assaf commented Oct 25, 2012

Hopefully there's some way to check if signpass is installed, and if not, skip this test.

On Oct 25, 2012, at 11:30 AM, Dan Milon [email protected] wrote:

$ npm test

[email protected] test /home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook
mocha

․․․․․․․․pass.json 196
[email protected] 9839
[email protected] 5887
logo.png 2322
icon.png 4573
strip.png 2800
[email protected] 2892
manifest.json 391
signature 3334
․․․․․․․․․

✖ 2 of 17 tests failed:

  1. Passbook generated should be a valid ZIP:
    Error: done() called multiple times
    at multiple (/usr/lib/node_modules/mocha/lib/runnable.js:152:31)
    at done (/usr/lib/node_modules/mocha/lib/runnable.js:158:26)
    at Zip.Runnable.run.duration (/usr/lib/node_modules/mocha/lib/runnable.js:174:9)
    at Zip.EventEmitter.emit (events.js:90:17)
    at null. (/home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook/lib/zip.js:39:9)
    at EventEmitter.emit (events.js:90:17)
    at WriteStream.flush (fs.js:1517:12)
    at Object.oncomplete (fs.js:297:15)

  2. Passbook generated should contain a signature:

AssertionError: false == true
at /home/razor/Documents/dev/photiq/photiq-api/node_modules/passbook/test/passbook_test.js:153:9
at ChildProcess.exithandler (child_process.js:544:7)
at ChildProcess.EventEmitter.emit (events.js:96:17)
at maybeClose (child_process.js:638:16)
at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
at Socket.EventEmitter.emit (events.js:93:17)
at Socket._destroy.destroyed (net.js:357:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)

npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
First error is reasonable. at this test a streams response is piped to the done function.

About the second one, probably its because it tries to execute the signpass program, which is distributed by Apple and is OSX only.


Reply to this email directly or view it on GitHub.

@danmilon
Copy link
Author

Yeah. Although the big issue here is the first fail. That should fail for you also. You are piping a stream to the test's callback function.

@assaf
Copy link
Owner

assaf commented Oct 25, 2012

First argument is output stream, second argument is a callback. Callback is getting triggered twice, by two different events.

On Oct 25, 2012, at 2:36 PM, Dan Milon [email protected] wrote:

Yeah. Although the big issue here is the first fail. That should fail for you also. You are piping a stream to the test's callback function.


Reply to this email directly or view it on GitHub.

@danmilon
Copy link
Author

That second argument is not node streams standard, but anyway, calling a callback twice is strange behavior imo.

@assaf
Copy link
Owner

assaf commented Oct 25, 2012

Passbook is not a stream, it's more of a rendering view that pipes to a stream (file, HTTP response, etc).

I'm not too worried about this part of the codebase because I'm about to change it soon.

On Oct 25, 2012, at 3:35 PM, Dan Milon [email protected] wrote:

That second argument is not node streams standard, but anyway, calling a callback twice is strange behavior imo.


Reply to this email directly or view it on GitHub.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants