Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
3ff5c36fdf | |||
a5acc2fe4e |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "3.1.45",
|
"version": "3.1.46",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "3.1.45",
|
"version": "3.1.46",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "do more with data",
|
"description": "do more with data",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
10
test/test.ts
10
test/test.ts
@ -102,10 +102,18 @@ tap.test('expect to get instance of Car', async () => {
|
|||||||
const myCars = await Car.getInstances<Car>({
|
const myCars = await Car.getInstances<Car>({
|
||||||
brand: 'Volvo',
|
brand: 'Volvo',
|
||||||
});
|
});
|
||||||
|
console.log(`took ${Date.now() - timeStart}`);
|
||||||
|
counter++;
|
||||||
|
} while (counter < 2000);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap.test('expect to get instance of Car', async () => {
|
||||||
|
let counter = 0;
|
||||||
|
do {
|
||||||
|
const timeStart = Date.now();
|
||||||
const myCars2 = await Car.getInstances<Car>({
|
const myCars2 = await Car.getInstances<Car>({
|
||||||
'deepData.sodeep': 'yes',
|
'deepData.sodeep': 'yes',
|
||||||
} as any);
|
} as any);
|
||||||
expect(myCars[0].color).to.equal('red');
|
|
||||||
console.log(`took ${Date.now() - timeStart}`);
|
console.log(`took ${Date.now() - timeStart}`);
|
||||||
counter++;
|
counter++;
|
||||||
} while (counter < 2000);
|
} while (counter < 2000);
|
||||||
|
Reference in New Issue
Block a user