npm test -t facets
server@1.0.0 test /home/coder/Documents/mflix-js
jest --passWithNoTests “facets”
Determining test suites to run…Setup Mongo Connection
FAIL test/facets.test.js
Facets
✓ should require cast members to perform search with (3ms)
✕ should return movies and runtime/rating facets for returned movies (859ms)
✕ should also support paging (869ms)
✓ should throw an error if castMembers is empty (2ms)
● Facets › should return movies and runtime/rating facets for returned movies
expect(received).toBe(expected) // Object.is equality
Expected: 4
Received: 5
16 | expect(actual.movies.length).toBe(20)
17 | expect(actual.rating.length).toBe(5)
> 18 | expect(actual.runtime.length).toBe(4)
| ^
19 | expect(actual.count).toBe(37)
20 | })
21 |
at toBe (test/facets.test.js:18:35)
at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:114:21)
at step (node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
● Facets › should also support paging
expect(received).toBe(expected) // Object.is equality
Expected: 4
Received: 3
25 | expect(actual.movies.length).toBe(18)
26 | expect(actual.rating.length).toBe(3)
> 27 | expect(actual.runtime.length).toBe(4)
| ^
28 | expect(actual.count).toBe(38)
29 | })
30 |
at toBe (test/facets.test.js:27:35)
at tryCatch (node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (node_modules/regenerator-runtime/runtime.js:296:22)
at Generator.prototype.(anonymous function) [as next] (node_modules/regenerator-runtime/runtime.js:114:21)
at step (node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at node_modules/babel-runtime/helpers/asyncToGenerator.js:28:13
Test Suites: 1 failed, 1 total
Tests: 2 failed, 2 passed, 4 total
Snapshots: 0 total
Time: 4.001s
Ran all test suites matching /facets/i.
Teardown Mongo Connection