You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running the steps in the README to generate the sample petstore app, I run 'npm test' against it. I get several 501 errors, which are expected in this case since I have not yet added the handlers, but the tests for "addPet post operation" is failing with 400 (bad request). I would expect that to also fail in the same way as the others. It appears that the request is not even making it into my (unimplemented) handler.
Here's the output of my npm test
TAP version 13
/pets
test findPets get operation
ok 1 should be truthy
ok 2 should be truthy
not ok 3 Ok response status
operator: equal
expected: 200
actual: 501
at: Test.<anonymous> (/home/croberts/src/petstore/tests/pets.js:70:11)
stack: |-
Error: Ok response status
at Test.assert [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:226:54)
at Test.bound [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.equal (/home/croberts/src/petstore/node_modules/tape/lib/test.js:386:10)
at Test.bound [as equal] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.<anonymous> (/home/croberts/src/petstore/tests/pets.js:70:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
...
test addPet post operation
ok 4 should be truthy
ok 5 should be truthy
not ok 6 Ok response status
operator: equal
expected: 200
actual: 400
at: Test.<anonymous> (/home/croberts/src/petstore/tests/pets.js:130:11)
stack: |-
Error: Ok response status
at Test.assert [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:226:54)
at Test.bound [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.equal (/home/croberts/src/petstore/node_modules/tape/lib/test.js:386:10)
at Test.bound [as equal] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.<anonymous> (/home/croberts/src/petstore/tests/pets.js:130:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
...
/pets/{id}
test findPetById get operation
ok 7 should be truthy
ok 8 should be truthy
not ok 9 Ok response status
operator: equal
expected: 200
actual: 400
at: Test.<anonymous> (/home/croberts/src/petstore/tests/pets/{id}.js:70:11)
stack: |-
Error: Ok response status
at Test.assert [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:226:54)
at Test.bound [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.equal (/home/croberts/src/petstore/node_modules/tape/lib/test.js:386:10)
at Test.bound [as equal] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.<anonymous> (/home/croberts/src/petstore/tests/pets/{id}.js:70:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
...
test deletePet delete operation
ok 10 should be truthy
ok 11 should be truthy
not ok 12 Ok response status
operator: equal
expected: 204
actual: 501
at: Test.<anonymous> (/home/croberts/src/petstore/tests/pets/{id}.js:130:11)
stack: |-
Error: Ok response status
at Test.assert [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:226:54)
at Test.bound [as _assert] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.equal (/home/croberts/src/petstore/node_modules/tape/lib/test.js:386:10)
at Test.bound [as equal] (/home/croberts/src/petstore/node_modules/tape/lib/test.js:77:32)
at Test.<anonymous> (/home/croberts/src/petstore/tests/pets/{id}.js:130:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
...
1..12
tests 12
pass 8
fail 4
The text was updated successfully, but these errors were encountered:
After running the steps in the README to generate the sample petstore app, I run 'npm test' against it. I get several 501 errors, which are expected in this case since I have not yet added the handlers, but the tests for "addPet post operation" is failing with 400 (bad request). I would expect that to also fail in the same way as the others. It appears that the request is not even making it into my (unimplemented) handler.
Here's the output of my
npm test
TAP version 13
/pets
test findPets get operation
ok 1 should be truthy
ok 2 should be truthy
not ok 3 Ok response status
...
test addPet post operation
ok 4 should be truthy
ok 5 should be truthy
not ok 6 Ok response status
...
/pets/{id}
test findPetById get operation
ok 7 should be truthy
ok 8 should be truthy
not ok 9 Ok response status
...
test deletePet delete operation
ok 10 should be truthy
ok 11 should be truthy
not ok 12 Ok response status
...
1..12
tests 12
pass 8
fail 4
The text was updated successfully, but these errors were encountered: