Skip to content

Instantly share code, notes, and snippets.

@aaronash
Created August 8, 2016 17:31
Show Gist options
  • Save aaronash/ab79fec63f44f4c98d0a6ee9f348c4eb to your computer and use it in GitHub Desktop.
Save aaronash/ab79fec63f44f4c98d0a6ee9f348c4eb to your computer and use it in GitHub Desktop.
$ cd node_modules/baucis
$ npm install
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
[email protected] /Users/ash/node/2016/baucistest/node_modules/baucis
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY express@^4.12.0
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ ├─┬ [email protected]
│ │ │ │ │ │ └── [email protected]
│ │ │ │ │ ├── [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── UNMET PEER DEPENDENCY mongoose@>=3 <5
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ └── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├── [email protected]
│ │ │ ├── [email protected]
│ │ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
npm WARN [email protected] requires a peer of express@^4.12.0 but none was installed.
npm WARN [email protected] requires a peer of mongoose@>=3 <5 but none was installed.
$ npm test
> [email protected] test /Users/ash/node/2016/baucistest/node_modules/baucis
> mocha --bail
Controllers
(node:55680) DeprecationWarning: Mongoose: mpromise (mongoose's default promise library) is deprecated, plug in your own promise library instead: http://mongoosejs.com/docs/promises.html
✓ should allow passing string name to create
✓ should allow passing a model to create
✓ should not allow leaving off arguments to create
✓ should not allow weird arguments to create
✓ should have methods set by default
(node:55680) DeprecationWarning: Mongoose: Query.prototype.stream() is deprecated in mongoose >= 4.5.0, use Query.prototype.cursor() instead
✓ should support select options for GET requests (84ms)
✓ should allow deselecting
✓ should allow deselecting hyphenated field names
✓ should support select options for POST requests
✓ should support select options for PUT requests (45ms)
✓ should allow POSTing when fields are deselected (issue #67)
✓ should support finding documents with custom findBy field
✓ should disallow adding a non-unique findBy field
✓ should allow adding a uniqe findBy field 1
✓ should allow adding a unique findBy field 2
✓ should allow adding arbitrary routes
✓ should allow adding arbitrary routes with params
✓ should still allow using baucis routes when adding arbitrary routes
✓ should allow using middleware
✓ should allow using middleware mounted at a path
✓ should disallow unrecognized verbs
✓ should disallow unrecognized howManys
✓ should allow specifying instance or collection middleware
✓ should allow registering query middleware for other verbs
✓ should allow registering POST middleware for other stages
✓ should correctly set the deselected paths property
✓ should disallow push mode by default
✓ should disallow pushing to non-whitelisted paths
✓ should allow pushing to an instance document's whitelisted arrays when $push mode is enabled
✓ should disallow $pull mode by default
✓ should disallow pulling non-whitelisted paths
✓ should allow pulling from an instance document's whitelisted arrays when $pull mode is enabled
✓ should disallow push mode by default
✓ should disallow setting non-whitelisted paths
✓ should allow setting an instance document's whitelisted paths when $set mode is enabled
✓ should allow pushing to embedded arrays using positional $
✓ should allow setting embedded fields using positional $
✓ should allow pulling from embedded fields using positional $
✓ should send 405 when a verb is disabled (GET)
✓ should send 405 when a verb is disabled (DELETE)
✓ should return a 400 when ID malformed (not ObjectID)
✓ should return a 400 when ID malformed (not Number)
✓ should allow setting path different from model name
✓ should allow setting model independently of name
1) should handle unique key error as a validation error
44 passing (2s)
1 failing
1) Controllers should handle unique key error as a validation error:
Uncaught Error: expected { message: 'Path `???` (???) must be unique.',
originalMessage: 'E11000 duplicate key error collection: yYyBaUcIsTeStYyY.cheeses index: name_1 dup key: { : "Gorgonzola" }',
name: 'MongoError',
path: '???',
type: 'unique',
value: '???' } to have a property 'message' of 'Path `name` (Gorgonzola) must be unique.', but got 'Path `???` (???) must be unique.'
at Assertion.assert (node_modules/expect.js/index.js:96:13)
at Assertion.property (node_modules/expect.js/index.js:388:12)
at Request._callback (test/controllers.js:599:33)
at Request.self.callback (node_modules/request/request.js:187:22)
at Request.<anonymous> (node_modules/request/request.js:1044:10)
at IncomingMessage.<anonymous> (node_modules/request/request.js:965:12)
at endReadableNT (_stream_readable.js:975:12)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)
npm ERR! Test failed. See above for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment