michaelkrone / generator-material-app

Yet another yeoman generator for scaffolding a simple Node.js/Express/MongoDB/Angular.js app using some material design elements.
MIT License
177 stars 47 forks source link

gulp unit:server is not working #81

Open Stupidism opened 8 years ago

Stupidism commented 8 years ago

63

Stupidism commented 8 years ago
  1) App should return with status 404 for an uncovered api route.:
     Error: timeout of 2000ms exceeded
    at Timeout.<anonymous> (/home/stupid/Documents/demos/material-app/node_modules/mocha/lib/runnable.js:158:19)
    at tryOnTimeout (timers.js:224:11)
    at Timer.listOnTimeout (timers.js:198:5)
Stupidism commented 8 years ago
  2) User Model should fail when saving a duplicate user:
     Uncaught AssertionError: expected null to exist
Stupidism commented 8 years ago

This is because I add 404 not found for get put and delete method of ParamController

  3) param controller GET should return a document for its id:
     Error: expected 200 "OK", got 404 "Not Found"
  4) param controller PUT should update a document and respond with the updated document:
     Error: expected 200 "OK", got 404 "Not Found"
  5) param controller DELETE should delete a document and respond with 204:
     Error: expected 204 "No Content", got 404 "Not Found"
Stupidism commented 8 years ago

And before all these

GET /api/this/route/will/never/exist 404 2ms
[18:04:29] { [Error: unexpected end of file]
  errno: -5,
  code: 'Z_BUF_ERROR',
  domainEmitter: 
   Stream {
     domain: 
      Domain {
        domain: null,
        _events: [Object],
        _eventsCount: 1,
        _maxListeners: undefined,
        members: [],
        '__$cntxt__': {} },
     _events: { data: [Function], end: [Object] },
     _eventsCount: 2,
     _maxListeners: undefined,
     req: 
      ClientRequest {
        domain: [Object],
        _events: [Object],
        _eventsCount: 3,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: false,
        sendDate: false,
        _removedHeader: {},
        _contentLength: 0,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'GET /api/this/route/will/never/exist HTTP/1.1\r\nHost: 127.0.0.1:43761\r\nAccept-Encoding: gzip, deflate\r\nCookie: \r\nUser-Agent: node-superagent/0.18.0\r\nConnection: close\r\n\r\n',
        _headers: [Object],
        _headerNames: [Object],
        _onPendingData: null,
        agent: [Object],
        socketPath: undefined,
        method: 'GET',
        path: '/api/this/route/will/never/exist',
        parser: null,
        res: [Object] } },
  domain: 
   Domain {
     domain: null,
     _events: { error: [Function: handleException] },
     _eventsCount: 1,
     _maxListeners: undefined,
     members: [],
     '__$cntxt__': {} },
  domainThrown: false,
  name: 'Error',
  message: 'unexpected end of file',
  stack: 'Error: unexpected end of file\n  at Zlib._handle.onerror (zlib.js:370:17)\n',
  showStack: true,
  showProperties: true,
  plugin: 'gulp-mocha' }
[18:04:29] 'unit:server' errored after 562 ms
[18:04:29] Error in plugin 'gulp-mocha'