Skip to content

Commit

Permalink
fix: use "db_util.isNullOrUndefined"
Browse files Browse the repository at this point in the history
- remove imports of "util.isNullOrUndefined" and replaces with "db_util.isNullOrUndefined"
- MongoMemoryServer: ensureInstance: remove extra ":" in logging
  • Loading branch information
hasezoey authored and nodkz committed Sep 10, 2020
1 parent d32aec1 commit 83ce9fe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions packages/mongodb-memory-server-core/src/MongoMemoryServer.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { ChildProcess } from 'child_process';
import * as tmp from 'tmp';
import getPort from 'get-port';
import { generateDbName, getUriBase } from './util/db_util';
import { generateDbName, getUriBase, isNullOrUndefined } from './util/db_util';
import MongoInstance from './util/MongoInstance';
import { MongoBinaryOpts } from './util/MongoBinary';
import { MongoMemoryInstancePropT, StorageEngineT, SpawnOptions } from './types';
import { isNullOrUndefined } from 'util';
import debug from 'debug';

const log = debug('MongoMS:MongoMemoryServer');
Expand Down Expand Up @@ -217,7 +216,7 @@ export default class MongoMemoryServer {
* -> throws if instance cannot be started
*/
async ensureInstance(): Promise<MongoInstanceDataT> {
log('Called MongoMemoryServer.ensureInstance() method:');
log('Called MongoMemoryServer.ensureInstance() method');
if (this.runningInstance) {
return this.runningInstance;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { execSync } from 'child_process';
import resolveConfig from './resolve-config';
import debug from 'debug';
import * as semver from 'semver';
import { isNullOrUndefined } from 'util';
import { isNullOrUndefined } from './db_util';

const log = debug('MongoMS:MongoBinaryDownloadUrl');

Expand Down
3 changes: 2 additions & 1 deletion packages/mongodb-memory-server-core/src/util/getos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { readFile, readdir } from 'fs';
import { platform } from 'os';

import { exec } from 'child_process';
import { promisify, isNullOrUndefined } from 'util';
import { promisify } from 'util';
import { join } from 'path';
import resolveConfig from '../resolve-config';
import debug from 'debug';
import { isNullOrUndefined } from '../db_util';

const log = debug('MongoMS:getos');

Expand Down

0 comments on commit 83ce9fe

Please sign in to comment.