fix(core): update

This commit is contained in:
Philipp Kunz 2020-09-10 10:36:00 +00:00
parent c5aa747f42
commit 9466af6a4a
3 changed files with 14 additions and 10 deletions

14
package-lock.json generated
View File

@ -7686,18 +7686,18 @@
} }
}, },
"mongodb-memory-server": { "mongodb-memory-server": {
"version": "6.7.0", "version": "6.7.2",
"resolved": "https://verdaccio.lossless.one/mongodb-memory-server/-/mongodb-memory-server-6.7.0.tgz", "resolved": "https://verdaccio.lossless.one/mongodb-memory-server/-/mongodb-memory-server-6.7.2.tgz",
"integrity": "sha512-vCXvDfi2Sbvg6/Ww0LBRbp5FZtqeFA1zLJeF4wlwU7IBwcop3zI75nq+dm6hlMzLGVIsLhN5fb1Ps8hztz3TFw==", "integrity": "sha512-isWtb1HM8z9wdLgOe4YZJjJGPRsDQfPh4X1cJfdUJcdRDl0A5Ullck6Yby2JYnTH9SFQaUePhi4RQnmQW98eNQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"mongodb-memory-server-core": "6.7.0" "mongodb-memory-server-core": "6.7.2"
} }
}, },
"mongodb-memory-server-core": { "mongodb-memory-server-core": {
"version": "6.7.0", "version": "6.7.2",
"resolved": "https://verdaccio.lossless.one/mongodb-memory-server-core/-/mongodb-memory-server-core-6.7.0.tgz", "resolved": "https://verdaccio.lossless.one/mongodb-memory-server-core/-/mongodb-memory-server-core-6.7.2.tgz",
"integrity": "sha512-N6pQqS6KjOGcfdydDgJ0ddaaifM8Ee6BtP+nFQIDjon76pvOtPuR8PddXM/tWeSv5fNhPx00/ILZCmpE8IiwLw==", "integrity": "sha512-SZ2Nw+4xZvRJ9r2q3mcE0rf8fz8u5FP1qvFydom6Q1VfDGR+rlunVPw/raw2JvuprbkxzpA1RQSiutnk4YLnCQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/tmp": "^0.2.0", "@types/tmp": "^0.2.0",

View File

@ -41,7 +41,7 @@
"@types/mongodb-memory-server": "^2.3.0", "@types/mongodb-memory-server": "^2.3.0",
"@types/node": "^14.6.4", "@types/node": "^14.6.4",
"@types/shortid": "0.0.29", "@types/shortid": "0.0.29",
"mongodb-memory-server": "^6.7.0", "mongodb-memory-server": "^6.7.2",
"tslint": "^6.1.3", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },

View File

@ -95,7 +95,7 @@ tap.test('should save the car to the db', async () => {
} while (counter < 2000); } while (counter < 2000);
}); });
tap.test('expect to get instance of Car', async () => { tap.test('expect to get instance of Car with shallow match', async () => {
let counter = 0; let counter = 0;
do { do {
const timeStart = Date.now(); const timeStart = Date.now();
@ -103,11 +103,13 @@ tap.test('expect to get instance of Car', async () => {
brand: 'Renault', brand: 'Renault',
}); });
console.log(`took ${Date.now() - timeStart}`); console.log(`took ${Date.now() - timeStart}`);
expect(myCars[0].deepData.sodeep).to.equal('yes');
expect(myCars[0].brand).to.equal('Renault');
counter++; counter++;
} while (counter < 30); } while (counter < 30);
}); });
tap.test('expect to get instance of Car', async () => { tap.test('expect to get instance of Car with deep match', async () => {
let counter = 0; let counter = 0;
do { do {
const timeStart = Date.now(); const timeStart = Date.now();
@ -115,6 +117,8 @@ tap.test('expect to get instance of Car', async () => {
'deepData.sodeep': 'yes', 'deepData.sodeep': 'yes',
} as any); } as any);
console.log(`took ${Date.now() - timeStart}`); console.log(`took ${Date.now() - timeStart}`);
expect(myCars2[0].deepData.sodeep).to.equal('yes');
expect(myCars2[0].brand).to.equal('Volvo');
counter++; counter++;
} while (counter < 30); } while (counter < 30);
}); });