Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 601651c81a | |||
| bf31318a95 |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@pushrocks/smartmongo",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@pushrocks/smartmongo",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@pushrocks/smartdata": "^4.0.27",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartmongo",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"private": false,
|
||||
"description": "create a local mongodb for testing",
|
||||
"main": "dist_ts/index.js",
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as smartmongo from '../ts/index';
|
||||
let smartmongoInstance: smartmongo.SmartMongo;
|
||||
|
||||
tap.test('should create a mongo instance', async () => {
|
||||
smartmongoInstance = await smartmongo.SmartMongo.createInstance();
|
||||
smartmongoInstance = await smartmongo.SmartMongo.createAndInit();
|
||||
});
|
||||
|
||||
tap.test('should stop the instance', async () => {
|
||||
|
||||
@@ -2,9 +2,9 @@ import * as plugins from './smartmongo.plugins';
|
||||
|
||||
export class SmartMongo {
|
||||
// STATIC
|
||||
public static async createInstance() {
|
||||
public static async createAndInit() {
|
||||
const smartMongoInstance = new SmartMongo();
|
||||
await smartMongoInstance.readyPromise;
|
||||
await smartMongoInstance.init();
|
||||
return smartMongoInstance;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ export class SmartMongo {
|
||||
public mongod: plugins.mongoPlugin.MongoMemoryServer;
|
||||
|
||||
constructor() {
|
||||
this.init();
|
||||
}
|
||||
|
||||
public async init() {
|
||||
|
||||
Reference in New Issue
Block a user