4 Commits

Author SHA1 Message Date
457de52134 1.0.7 2021-12-20 17:07:40 +01:00
997a662d63 fix(core): update 2021-12-20 17:07:39 +01:00
0f81392b8e 1.0.6 2021-12-20 17:02:20 +01:00
9c5f5ea44e fix(core): update 2021-12-20 17:02:19 +01:00
4 changed files with 7 additions and 7 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@pushrocks/smartmongo",
"version": "1.0.5",
"version": "1.0.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@pushrocks/smartmongo",
"version": "1.0.5",
"version": "1.0.7",
"license": "MIT",
"dependencies": {
"@pushrocks/smartdata": "^4.0.27",

View File

@@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartmongo",
"version": "1.0.5",
"version": "1.0.7",
"private": false,
"description": "create a local mongodb for testing",
"main": "dist_ts/index.js",

View File

@@ -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.createAndInit();
smartmongoInstance = await smartmongo.SmartMongo.createAndStart();
});
tap.test('should stop the instance', async () => {

View File

@@ -2,9 +2,9 @@ import * as plugins from './smartmongo.plugins';
export class SmartMongo {
// STATIC
public static async createAndInit() {
public static async createAndStart() {
const smartMongoInstance = new SmartMongo();
await smartMongoInstance.init();
await smartMongoInstance.start();
return smartMongoInstance;
}
@@ -16,7 +16,7 @@ export class SmartMongo {
constructor() {
}
public async init() {
public async start() {
this.mongod = await plugins.mongoPlugin.MongoMemoryServer.create();
this._readyDeferred.resolve();
console.log('mongod started');