q3-schema-utils
Advanced tools
Comparing version 1.0.39 to 1.0.40
{ | ||
"name": "q3-schema-utils", | ||
"version": "1.0.39", | ||
"version": "1.0.40", | ||
"main": "index.js", | ||
@@ -10,6 +10,6 @@ "dependencies": { | ||
"mongoose": "^5.7.1", | ||
"q3-core-responder": "^1.0.67" | ||
"q3-core-responder": "^1.0.68" | ||
}, | ||
"devDependencies": { | ||
"q3-test-utils": "^1.0.77" | ||
"q3-test-utils": "^1.0.78" | ||
}, | ||
@@ -24,3 +24,3 @@ "jest": { | ||
}, | ||
"gitHead": "9ff94db136e7bcce72f8f23b6a2bb6bb01955adf" | ||
"gitHead": "11179bb40ed7c28b3530872c875ad58f1da23997" | ||
} |
@@ -99,3 +99,3 @@ const mongoose = require('mongoose'); | ||
await Model.archive(id); | ||
await expectInactive(id); | ||
return expectInactive(id); | ||
}); | ||
@@ -107,3 +107,3 @@ | ||
await Model.archiveMany(ids); | ||
await expectInactive(ids[0]); | ||
return expectInactive(ids[0]); | ||
}); | ||
@@ -137,3 +137,3 @@ }); | ||
const resp = await Model.create(stub); | ||
await countDogsAfterPush(resp, 4); | ||
return countDogsAfterPush(resp, 4); | ||
}); | ||
@@ -143,3 +143,3 @@ | ||
const resp = await Model.create({ name: 'Test' }); | ||
await countDogsAfterPush(resp, 1); | ||
return countDogsAfterPush(resp, 1); | ||
}); | ||
@@ -154,3 +154,3 @@ }); | ||
} = resp; | ||
await countDogsAfterDeletion(resp, id, 2); | ||
return countDogsAfterDeletion(resp, id, 2); | ||
}); | ||
@@ -160,3 +160,3 @@ | ||
const resp = await Model.create(stub); | ||
await countDogsAfterDeletion( | ||
return countDogsAfterDeletion( | ||
resp, | ||
@@ -181,3 +181,3 @@ getIds(resp.dogs), | ||
); | ||
expect(dogs[0].breed).toBe(breed); | ||
return expect(dogs[0].breed).toBe(breed); | ||
}); | ||
@@ -191,3 +191,3 @@ }); | ||
const doc2 = await Model.findOneOrCreate(args); | ||
expect(doc._id.equals(doc2._id)).toBeTruthy(); | ||
return expect(doc._id.equals(doc2._id)).toBeTruthy(); | ||
}); | ||
@@ -197,3 +197,3 @@ }); | ||
describe('schema helpers', () => { | ||
it('should return all ObjectIds', async () => { | ||
it('should return all ObjectIds', () => { | ||
expect(Model.getReferentialPaths()).toEqual([ | ||
@@ -204,7 +204,7 @@ 'friend', | ||
it('should return all required fields', async () => { | ||
it('should return all required fields', () => { | ||
expect(Model.getRequiredFields()).toEqual(['age']); | ||
}); | ||
it('should return all fields', async () => { | ||
it('should return all fields', () => { | ||
expect(Model.getAllFields()).toEqual( | ||
@@ -211,0 +211,0 @@ expect.arrayContaining([ |
19233
Updatedq3-core-responder@^1.0.68