americanexpress / parrot

✨ Scenario-based HTTP mocking
Apache License 2.0
139 stars 30 forks source link

Failing test cases #34

Closed ghost closed 4 years ago

ghost commented 4 years ago

` FAIL packages/parrot-server/tests/index.spec.js ● defaults to port 3001 if --port is not given

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  53 | 
  54 |   const response = await fetch('http://localhost:3001/parrot/scenarios');
> 55 |   expect(response.status).toBe(200);
     |                           ^
  56 | });
  57 | 
  58 | it('starts server on given port', async () => {

  at _callee2$ (packages/parrot-server/__tests__/index.spec.js:55:27)
  at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
  at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
  at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
  at asyncGeneratorStep (packages/parrot-server/__tests__/index.spec.js:11:103)
  at _next (packages/parrot-server/__tests__/index.spec.js:13:194)

● starts server on given port

expect(received).toBe(expected) // Object.is equality

Expected: 200
Received: 404

  66 | 
  67 |   const response = await fetch(`http://localhost:${portNumber}/parrot/scenarios`);
> 68 |   expect(response.status).toBe(200);
     |                           ^
  69 | });
  70 | 
  71 | it('exits with status 1 if something goes wrong while starting the server', () => {

  at _callee3$ (packages/parrot-server/__tests__/index.spec.js:68:27)
  at tryCatch (node_modules/regenerator-runtime/runtime.js:45:40)
  at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:271:22)
  at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:97:21)
  at asyncGeneratorStep (packages/parrot-server/__tests__/index.spec.js:11:103)
  at _next (packages/parrot-server/__tests__/index.spec.js:13:194)

`

heythisispaul commented 4 years ago

@jgolden17 Is this still an issue? I cloned this down to resolve this but was not getting this failure using Node 12.16.1 on Windows 10.

ghost commented 4 years ago

Sorry for the late reply. I believe this is resolved. I'll double check today and close out the issue.