req.subdomains tests fail in Windows #1600

Closed
mcandre opened this Issue May 3, 2013 · 1 comment

Comments

Projects
None yet
2 participants

mcandre commented May 3, 2013

Trace:

$ mocha test/req.subdomains.js

  .....

  × 3 of 5 tests failed:

  1) req .subdomains when present should return an array:
     Error: expected '["ferrets","tobi"]' response body, got '[\n  "ferrets",\n  "tobi"\n]'
      at Test.assert (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\lib\test.js:177:21)
      at c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\lib\test.js:124:10
      at Test.Request.callback (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:575:3)
      at Test.<anonymous> (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:133:10)
      at Test.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:703:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:883:14
      at process._tickCallback (node.js:415:13)

  2) req .subdomains when subdomain offset is set when subdomain offset is zero should return an array with the whole domain:
     Error: expected '["com","example","sub","ferrets","tobi"]' response body, got '[\n
 "com",\n  "example",\n  "sub",\n  "ferrets",\n  "tobi"\n]'
      at Test.assert (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\lib\test.js:177:21)
      at c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\lib\test.js:124:10
      at Test.Request.callback (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:575:3)
      at Test.<anonymous> (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:133:10)
      at Test.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:703:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:883:14
      at process._tickCallback (node.js:415:13)

  3) req .subdomains when subdomain offset is set when present should return an array:
     Error: expected '["ferrets","tobi"]' response body, got '[\n  "ferrets",\n  "tobi"\n]'
      at Test.assert (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\lib\test.js:177:21)
      at c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\lib\test.js:124:10
      at Test.Request.callback (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:575:3)
      at Test.<anonymous> (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:133:10)
      at Test.EventEmitter.emit (events.js:95:17)
      at IncomingMessage.<anonymous> (c:\Documents and Settings\apenneba\Desktop\src\express\node_modules\supertest\node_modules\superagent\lib\node\index.js:703:12)
      at IncomingMessage.EventEmitter.emit (events.js:117:20)
      at _stream_readable.js:883:14
      at process._tickCallback (node.js:415:13)
Member

jonathanong commented Sep 10, 2013

can anyone confirm? i don't have a windows machine to check

@rlidwka rlidwka pushed a commit to rlidwka/express that referenced this issue Aug 6, 2014

@jonathanong jonathanong Merge pull request #1759 from muratgu/patch-1
fixes #1600
09df2fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment