Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f50a61308c | |||
42aa9f9f8a |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "4.0.22",
|
"version": "4.0.23",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "4.0.22",
|
"version": "4.0.23",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^5.0.0",
|
"@pushrocks/lik": "^5.0.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/smartdata",
|
"name": "@pushrocks/smartdata",
|
||||||
"version": "4.0.22",
|
"version": "4.0.23",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "do more with data",
|
"description": "do more with data",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
@ -19,7 +19,7 @@ let testDb: smartdata.SmartdataDb;
|
|||||||
let smartdataOptions: smartdata.IMongoDescriptor;
|
let smartdataOptions: smartdata.IMongoDescriptor;
|
||||||
let mongod: mongoPlugin.MongoMemoryServer;
|
let mongod: mongoPlugin.MongoMemoryServer;
|
||||||
|
|
||||||
tap.test('should create a testinstance as database', async () => {
|
tap.skip.test('should create a testinstance as database', async () => {
|
||||||
mongod = await mongoPlugin.MongoMemoryServer.create();
|
mongod = await mongoPlugin.MongoMemoryServer.create();
|
||||||
console.log('created mongod instance');
|
console.log('created mongod instance');
|
||||||
console.log('mongod started');
|
console.log('mongod started');
|
||||||
@ -31,7 +31,7 @@ tap.test('should create a testinstance as database', async () => {
|
|||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.skip.test('should connect to atlas', async (tools) => {
|
tap.test('should connect to atlas', async (tools) => {
|
||||||
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
||||||
testDb = new smartdata.SmartdataDb({
|
testDb = new smartdata.SmartdataDb({
|
||||||
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
||||||
@ -53,7 +53,11 @@ tap.test('should create an easystore', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tap.test('close', async () => {
|
tap.test('close', async () => {
|
||||||
|
if (mongod) {
|
||||||
await mongod.stop();
|
await mongod.stop();
|
||||||
|
} else {
|
||||||
|
await testDb.mongoDb.dropDatabase();
|
||||||
|
}
|
||||||
await testDb.close();
|
await testDb.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ let mongod: mongoPlugin.MongoMemoryServer;
|
|||||||
|
|
||||||
const totalCars = 2000;
|
const totalCars = 2000;
|
||||||
|
|
||||||
tap.test('should create a testinstance as database', async () => {
|
tap.skip.test('should create a testinstance as database', async () => {
|
||||||
mongod = await mongoPlugin.MongoMemoryServer.create();
|
mongod = await mongoPlugin.MongoMemoryServer.create();
|
||||||
console.log('created mongod instance');
|
console.log('created mongod instance');
|
||||||
console.log('mongod started');
|
console.log('mongod started');
|
||||||
@ -33,7 +33,7 @@ tap.test('should create a testinstance as database', async () => {
|
|||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.skip.test('should connect to atlas', async (tools) => {
|
tap.test('should connect to atlas', async (tools) => {
|
||||||
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
||||||
testDb = new smartdata.SmartdataDb({
|
testDb = new smartdata.SmartdataDb({
|
||||||
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
||||||
@ -211,7 +211,11 @@ tap.test('should use a cursor', async () => {
|
|||||||
// close the database connection
|
// close the database connection
|
||||||
// =======================================
|
// =======================================
|
||||||
tap.test('close', async () => {
|
tap.test('close', async () => {
|
||||||
|
if (mongod) {
|
||||||
await mongod.stop();
|
await mongod.stop();
|
||||||
|
} else {
|
||||||
|
await testDb.mongoDb.dropDatabase();
|
||||||
|
}
|
||||||
await testDb.close();
|
await testDb.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ let mongod: mongoPlugin.MongoMemoryServer;
|
|||||||
|
|
||||||
const totalCars = 2000;
|
const totalCars = 2000;
|
||||||
|
|
||||||
tap.test('should create a testinstance as database', async () => {
|
tap.skip.test('should create a testinstance as database', async () => {
|
||||||
mongod = await mongoPlugin.MongoMemoryServer.create();
|
mongod = await mongoPlugin.MongoMemoryServer.create();
|
||||||
console.log('created mongod instance');
|
console.log('created mongod instance');
|
||||||
console.log('mongod started');
|
console.log('mongod started');
|
||||||
@ -33,7 +33,7 @@ tap.test('should create a testinstance as database', async () => {
|
|||||||
await testDb.init();
|
await testDb.init();
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.skip.test('should connect to atlas', async (tools) => {
|
tap.test('should connect to atlas', async (tools) => {
|
||||||
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
const databaseName = `test-smartdata-${smartunique.shortId()}`;
|
||||||
testDb = new smartdata.SmartdataDb({
|
testDb = new smartdata.SmartdataDb({
|
||||||
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
mongoDbUrl: testQenv.getEnvVarOnDemand('MONGO_URL'),
|
||||||
@ -93,7 +93,11 @@ tap.test('should get a car', async () => {
|
|||||||
// close the database connection
|
// close the database connection
|
||||||
// =======================================
|
// =======================================
|
||||||
tap.test('close', async () => {
|
tap.test('close', async () => {
|
||||||
|
if (mongod) {
|
||||||
await mongod.stop();
|
await mongod.stop();
|
||||||
|
} else {
|
||||||
|
await testDb.mongoDb.dropDatabase();
|
||||||
|
}
|
||||||
await testDb.close();
|
await testDb.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user