Created
May 27, 2021 19:55
-
-
Save jcrossley3/69c9dd1e3d5f33394c7d9f007371489f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[jim@localhost drogue-addict]$ npm test | |
> event-handler@0.1.0 test /home/jim/tmp/drogue-addict | |
> node test/unit.js && node test/integration.js | |
TAP version 13 | |
# Unit: handles a valid event | |
context | |
{ | |
"cloudevent": { | |
"id": "01234", | |
"type": "com.example.cloudevents.test", | |
"source": "/test", | |
"specversion": "1.0", | |
"time": "2021-05-27T19:48:52.302Z", | |
"data": { | |
"name": "tiger", | |
"customerId": "01234" | |
} | |
}, | |
"log": {} | |
} | |
event | |
{ | |
"name": "tiger", | |
"customerId": "01234" | |
} | |
not ok 1 should be truthy | |
--- | |
operator: ok | |
expected: true | |
actual: undefined | |
at: Test.<anonymous> (/home/jim/tmp/drogue-addict/test/unit.js:27:5) | |
stack: |- | |
Error: should be truthy | |
at Test.assert [as _assert] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:228:54) | |
at Test.bound [as _assert] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:80:32) | |
at Test.assert (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:347:10) | |
at Test.bound [as ok] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:80:32) | |
at Test.<anonymous> (/home/jim/tmp/drogue-addict/test/unit.js:27:5) | |
at Test.bound [as _cb] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:80:32) | |
at Test.run (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:96:10) | |
at Test.bound [as run] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:80:32) | |
at Immediate.next [as _onImmediate] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/results.js:83:19) | |
at processImmediate (internal/timers.js:462:21) | |
... | |
/home/jim/tmp/drogue-addict/test/unit.js:28 | |
t.equal(result.body, data); | |
^ | |
TypeError: Cannot read property 'body' of undefined | |
at Test.<anonymous> (/home/jim/tmp/drogue-addict/test/unit.js:28:18) | |
at Test.bound [as _cb] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:80:32) | |
at Test.run (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:96:10) | |
at Test.bound [as run] (/home/jim/tmp/drogue-addict/node_modules/tape/lib/test.js:80:32) | |
at Immediate.next (/home/jim/tmp/drogue-addict/node_modules/tape/lib/results.js:83:19) | |
at processImmediate (internal/timers.js:462:21) | |
npm ERR! Test failed. See above for more details. | |
[jim@localhost drogue-addict]$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment