Closed corporatepiyush closed 8 years ago
Seraph Model
http://neo4j.com/artifact.php?name=neo4j-community-2.3.1-unix.tar.gz
✓ it should read a model from the db (838ms)
✓ reading should only read the relevant model (140ms)
✓ querying should only read the relevant model (156ms)
✓ querying should allow other variables and preserve them (272ms)
✓ querying should allow manual filters (350ms)
✓ should allow "where" queries with options (360ms)
✓ should allow "where" queries with regexp fields (161ms)
✓ should allow "findAll" queries with options (236ms)
✓ should fetch out another model that is related (285ms)
✓ should save a model with a string id (127ms)
✓ it should check if a model exists
✓ exists should only return true for the relevant model (49ms)
export prototye
✓ should export the model prototype
validation
✓ should fail save call when validation fails
save events
✓ should fire the beforeSave event
✓ should fire the afterSave event
✓ should fire the beforeSave event after prep & val
preparation
✓ should transform the object by calling preparers
✓ should fail save call when a preparer fails
whitelisting/fields
✓ should whitelist a series of properties
✓ should not whitelist any fields by default
✓ should not remove composed fields
✓ should not introduce a whitelist on composing if there wasnt one
✓ should not matter which order comps and fields were added
sm#Composition
✓ it should allow composing of models and save them properly (172ms)
✓ it should allow transient composition (88ms)
✓ it should not save transient compositions (81ms)
✓ should not run before-save comp events on transient compositions
✓ should not run after-save comp events on transient compositions
✓ it should allow exclusion of composed models on save (78ms)
✓ it should not fire beforeSave event on excluded compositions
✓ it should not fire afterSave event on excluded compositions
✓ it should allow saving of only a composition (310ms)
✓ should not compute beyond a certain level if desired (135ms)
✓ should not compute anything if desired
✓ should allow implicit transformation of compositions (144ms)
✓ it should allow more than one level of nested composition (156ms)
✓ it should fire the before and after save events for composed models
✓ should fire beforeSave and afterSave events for pushComposition (61ms)
✓ should fire beforeSave and afterSave events for saveComposition (74ms)
✓ should handle presave async transforms (70ms)
✓ should properly index models
✓ should implicitly read compositions when reading (53ms)
✓ should read recursive compositions (205ms)
✓ should read a single composited property (114ms)
✓ should read composition relation properties (100ms)
✓ should update a composition (132ms)
✓ should push to a composition (46ms)
✓ should order a composition (92ms)
✓ should push multiple nodes to a composition (76ms)
✓ should push saved nodes to a composition (73ms)
✓ should support partial composition updates (155ms)
✓ should support partial composition collection pushes (128ms)
✓ should not convert a single-el array to an object
✓ should give a usable reply when asked for nonexistent data (65ms)
✓ should allow custom queries and add compositions (95ms)
✓ should allow adding relationship properties
uniqueness
1) should be able to set a unique key
✓ should be able to set a unique key and use return-old mode (123ms)
✓ should support multiple composited nodes it return-old mode (119ms)
2) should enforce uniqueness on composed models
✓ should support updating (107ms)
Timestamps
✓ should add timestamps (51ms)
✓ should add timestamps with custom names
✓ should update the updated timestamp upon saving (103ms)
✓ should not update the created timestamp upon saving (101ms)
✓ should not update the created timestamp upon saving with fields (102ms)
✓ should update updated when touched (97ms)
✓ should update root timestamp of composition when editing a detached child (254ms)
Computed fields
✓ should add a computed field (43ms)
✓ should add multiple computed fields with a single computer (41ms)
✓ shouldn't actually save computed field
✓ shouldn'nt save multiple computed fields with a single computer
✓ should add an async computed field (438ms)
✓ should compute fields when using where
(163ms)
✓ should compute fields when using findAll
(64ms)
✓ should work on composed models (510ms)
Schemas
validation: fail
✓ should fail save call when validation fails: required
✓ should fail save call when validation fails: match
✓ should fail save call when validation fails: enum
✓ should fail save call when validation fails: min/max
✓ should fail save call when cast fails
validation: pass
✓ should pass save call when validation passes: required
✓ should pass save call when validation passes: match
✓ should pass save call when validation passes: enum (56ms)
✓ should pass save call when validation passes: min/max
✓ should pass save call when cast passes
preparations
✓ should trim a string
✓ should lowercase a string
✓ should uppercase a string
88 passing (3m) 2 failing
1) Seraph Model uniqueness should be able to set a unique key:
Uncaught AssertionError: 400 == 409
+ expected - actual
-400
+409
at test/model_test.js:1218:20
at node_modules/async/lib/async.js:428:21
at lib/write.js:279:7
at node_modules/disposable-seraph/node_modules/seraph/lib/seraph.js:426:14
at Seraph.<anonymous> (node_modules/disposable-seraph/node_modules/seraph/lib/seraph.js:366:7)
at Request._callback (node_modules/disposable-seraph/node_modules/seraph/lib/seraph.js:182:7)
at Request.self.callback (node_modules/disposable-seraph/node_modules/seraph/node_modules/request/request.js:198:22)
at Request.<anonymous> (node_modules/disposable-seraph/node_modules/seraph/node_modules/request/request.js:1035:10)
at IncomingMessage.<anonymous> (node_modules/disposable-seraph/node_modules/seraph/node_modules/request/request.js:962:12)
at endReadableNT (_stream_readable.js:905:12)
2) Seraph Model uniqueness should enforce uniqueness on composed models:
Uncaught AssertionError: 400 == 409
+ expected - actual
-400
+409
at test/model_test.js:1274:20
at node_modules/async/lib/async.js:428:21
at lib/write.js:279:7
at node_modules/disposable-seraph/node_modules/seraph/lib/seraph.js:426:14
at Seraph.<anonymous> (node_modules/disposable-seraph/node_modules/seraph/lib/seraph.js:366:7)
at Request._callback (node_modules/disposable-seraph/node_modules/seraph/lib/seraph.js:182:7)
at Request.self.callback (node_modules/disposable-seraph/node_modules/seraph/node_modules/request/request.js:198:22)
at Request.<anonymous> (node_modules/disposable-seraph/node_modules/seraph/node_modules/request/request.js:1035:10)
at IncomingMessage.<anonymous> (node_modules/disposable-seraph/node_modules/seraph/node_modules/request/request.js:962:12)
at endReadableNT (_stream_readable.js:905:12)
npm ERR! Test failed. See above for more details.
Your errors seems like random crashes of seraph, it happens to me from times to times. i have neber been able to reproduce them but I suspect seraph not to be ready when it receives its first request.
A few of these were caused by neo4j changing their error reporting format between 2.2.* and 2.3.. These errors should be fixed now, and the whole test suite is passing for me now with 2.3..
Does it works with Neo4j 2.3.1 ? Is there a way to run test cases with latest version of Neo4j ?