fix(core): update
This commit is contained in:
parent
f6e4bfd17e
commit
bf31318a95
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user