Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some info from failed spec is lost (v4.0.0) #34

Closed
tomek-he-him opened this issue May 29, 2015 · 9 comments
Closed

Some info from failed spec is lost (v4.0.0) #34

tomek-he-him opened this issue May 29, 2015 · 9 comments

Comments

@tomek-he-him
Copy link

Raw output from tape:

not ok 4 • a cacheable output channel `state`
  ---
    operator: deepEqual
    expected:
      [ { property: 'on', type: 'function' }, { property: 'off', type: 'function' }, { property: 'when', type: 'function' } ]
    actual:
      [ { property: 'on', type: 'function' }, { property: 'when', type: 'function' }, { property: 'off', type: 'function' } ]
    at: Test.<anonymous> (/home/tomekwi/Libraries/studio-b12/bare-select/test/model.test.js:58:6)
  ...

Here’s how tap-spec v2.x displayed that:

image

tap-spec v4.0.0 has better looks, but loses the actual: … part:

image

It’d be great to have it back :)

@scottcorgan
Copy link
Owner

Fixed in version 4.0.0

@tomek-he-him
Copy link
Author

Actually no, this is an issue with v4.0.0. Read it carefully.

@tomek-he-him tomek-he-him changed the title Some info from failed spec is lost Some info from failed spec is lost (v4.0.0) Jun 11, 2015
@scottcorgan scottcorgan reopened this Jun 11, 2015
@scottcorgan
Copy link
Owner

Sorry for such a delay. Do you have sample code I can run to reproduce?

@tomek-he-him
Copy link
Author

Sorry for such a delay as well :) I haven’t run into the issue again until today.

To reproduce:

git clone [email protected]:studio-b12/doxie.append
cd doxie.append
git checkout 324619f
npm install; npm test

Raw output from tape:

$ node .es5/test.js 
TAP version 13
# Programmatic API:  Sticks a string at the end of the docs.
not ok 1 TypeError: undefined is not a function
  ---
    operator: error
    expected: undefined
    actual:   [TypeError: undefined is not a function]
    at: Test.assert (/home/tomekwi/Projects/Studio B12/doxie.append/node_modules/tape/lib/test.js:207:17)
    stack:
      TypeError: undefined is not a function
        at /home/tomekwi/Projects/Studio B12/doxie.append/.es5/module/index.js:10:47
        at Test.<anonymous> (/home/tomekwi/Projects/Studio B12/doxie.append/.es5/test/index.test.js:22:50)
        at Test.bound [as _cb] (/home/tomekwi/Projects/Studio B12/doxie.append/node_modules/tape/lib/test.js:62:32)
        at Test.exports.Test.run (/home/tomekwi/Projects/Studio B12/doxie.append/node_modules/tape-catch/index.js:17:10)
        at Test.bound [as run] (/home/tomekwi/Projects/Studio B12/doxie.append/node_modules/tape/lib/test.js:62:32)
        at Immediate.next [as _onImmediate] (/home/tomekwi/Projects/Studio B12/doxie.append/node_modules/tape/lib/results.js:67:15)
        at processImmediate [as _immediateCallback] (timers.js:367:17)
  ...

1..1
# tests 1
# pass  0
# fail  1

Output from tap-spec (the stack is lost):

image

And here’s the same output live on travis: https://travis-ci.org/studio-b12/doxie.append/jobs/71742577

tomek-he-him pushed a commit to b12-archive/doxie.append that referenced this issue Jul 20, 2015
@tomek-he-him
Copy link
Author

It’s fine with v2 by the way:

git checkout b3dba33
npm install; npm test

Or just peek here: https://travis-ci.org/studio-b12/doxie.append/jobs/71743643

tomek-he-him pushed a commit to b12-archive/less-index that referenced this issue Jul 22, 2015
@tomek-he-him
Copy link
Author

Hi! I’ve just checked it with v4.1.0. The OP case is now ok, but the latter (#34 (comment)) still isn’t. The stack gets lost:

$ cat <<——— | tap-spec
TAP version 13
# Programmatic API:  Sticks a string at the end of the docs.
not ok 1 TypeError: undefined is not a function
 ---
   operator: error
   expected: undefined
   actual:   [TypeError: undefined is not a function]
   at: Test.assert (…/node_modules/tape/lib/test.js:207:17)
   stack:
     TypeError: undefined is not a function
       at …/.es5/module/index.js:10:47
       at Test.<anonymous> (…/.es5/test/index.test.js:22:50)
       at Test.bound [as _cb] (…/node_modules/tape/lib/test.js:62:32)
       at Test.exports.Test.run (…/node_modules/tape-catch/index.js:17:10)
       at Test.bound [as run] (…/node_modules/tape/lib/test.js:62:32)
       at Immediate.next [as _onImmediate] (…/node_modules/tape/lib/results.js:67:15)
       at processImmediate [as _immediateCallback] (timers.js:367:17)
 ...

1..1
# tests 1
# pass  0
# fail  1
———

  Programmatic API:  Sticks a string at the end of the docs.


    ✖ TypeError: undefined is not a function
    -----------------------------------------
      operator: error
      expected: undefined
      actual:   [TypeError: undefined is not a function]
      at: Test.assert (…/node_modules/tape/lib/test.js:207:17)
      stack:




  Failed Tests: There was 1 failure

    Programmatic API:  Sticks a string at the end of the docs.

      ✖ TypeError: undefined is not a function


  total:     1
  passing:   0
  failing:   1
  duration:  13ms

To reproduce just paste everything up to and including the closing ——— into a POSIX-compliant shell (e.g. bash).

@keithamus
Copy link

Hey @scottcorgan - @tomekwi's latest comment looks like its a duplicate issue of #28. (Its not properly passing the multiline YAML value - the stack value).

I think if @tomekwi is happy that v4.1.0 fixes his original issue (undefined values not being reported), then this issue can be closed, as the stack issue is - as I say, a dupe of #28.

@tomek-he-him
Copy link
Author

Yeah, thanks for taking the time to look into this @keithamus!

@tomek-he-him
Copy link
Author

And thanks for the great tool @scottcorgan!!!

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

No branches or pull requests

3 participants