@naturalcycles/js-lib
Advanced tools
Comparing version 1.0.58 to 1.0.61
import { memo } from './decorators/memo.decorator'; | ||
import { memoCache } from './decorators/memoCache.decorator'; | ||
import { AppError } from './error/app.error'; | ||
import { deepFreeze, silentConsole } from './testing/test.shared.util'; | ||
import { deepFreeze, runAllTests, silentConsole, silentConsoleIfRunAll } from './testing/test.shared.util'; | ||
import { PromiseMap, StringMap } from './types'; | ||
@@ -10,2 +10,2 @@ import { objectUtil } from './util/object.util'; | ||
import { stringSharedUtil } from './util/string.shared.util'; | ||
export { memo, memoCache, AppError, deepFreeze, silentConsole, objectUtil, randomSharedUtil, scriptSharedUtil, stringSharedUtil, StringMap, PromiseMap, }; | ||
export { memo, memoCache, AppError, deepFreeze, silentConsole, runAllTests, silentConsoleIfRunAll, objectUtil, randomSharedUtil, scriptSharedUtil, stringSharedUtil, StringMap, PromiseMap, }; |
import { memo } from './decorators/memo.decorator'; | ||
import { memoCache } from './decorators/memoCache.decorator'; | ||
import { AppError } from './error/app.error'; | ||
import { deepFreeze, silentConsole, } from './testing/test.shared.util'; | ||
import { deepFreeze, runAllTests, silentConsole, silentConsoleIfRunAll, } from './testing/test.shared.util'; | ||
import { objectUtil } from './util/object.util'; | ||
@@ -9,3 +9,3 @@ import { randomSharedUtil } from './util/random.shared.util'; | ||
import { stringSharedUtil } from './util/string.shared.util'; | ||
export { memo, memoCache, AppError, deepFreeze, silentConsole, objectUtil, randomSharedUtil, scriptSharedUtil, stringSharedUtil, }; | ||
export { memo, memoCache, AppError, deepFreeze, silentConsole, runAllTests, silentConsoleIfRunAll, objectUtil, randomSharedUtil, scriptSharedUtil, stringSharedUtil, }; | ||
//# sourceMappingURL=index.js.map |
export declare function deepFreeze(o: any): void; | ||
export declare function silentConsole(): void; | ||
export declare function runAllTests(): boolean; | ||
export declare function silentConsoleIfRunAll(): void; |
@@ -21,2 +21,12 @@ // Source: https://github.com/substack/deep-freeze/blob/master/index.js | ||
} | ||
export function runAllTests() { | ||
const args = process.argv.slice(); | ||
const lastArg = args.filter(x => !x.startsWith('-')).pop(); | ||
return ((lastArg && (lastArg.endsWith('/jest') || lastArg.endsWith('/jest-worker/build/child.js'))) || | ||
false); | ||
} | ||
export function silentConsoleIfRunAll() { | ||
if (runAllTests()) | ||
silentConsole(); | ||
} | ||
//# sourceMappingURL=test.shared.util.js.map |
@@ -43,3 +43,3 @@ { | ||
}, | ||
"version": "1.0.58", | ||
"version": "1.0.61", | ||
"description": "", | ||
@@ -46,0 +46,0 @@ "author": "Natural Cycles Team", |
@@ -6,3 +6,5 @@ import { memo } from './decorators/memo.decorator' | ||
deepFreeze, | ||
runAllTests, | ||
silentConsole, | ||
silentConsoleIfRunAll, | ||
} from './testing/test.shared.util' | ||
@@ -21,2 +23,4 @@ import { PromiseMap, StringMap } from './types' | ||
silentConsole, | ||
runAllTests, | ||
silentConsoleIfRunAll, | ||
objectUtil, | ||
@@ -23,0 +27,0 @@ randomSharedUtil, |
@@ -26,1 +26,14 @@ // Source: https://github.com/substack/deep-freeze/blob/master/index.js | ||
} | ||
export function runAllTests (): boolean { | ||
const args = process.argv.slice() | ||
const lastArg = args.filter(x => !x.startsWith('-')).pop() | ||
return ( | ||
(lastArg && (lastArg.endsWith('/jest') || lastArg.endsWith('/jest-worker/build/child.js'))) || | ||
false | ||
) | ||
} | ||
export function silentConsoleIfRunAll (): void { | ||
if (runAllTests()) silentConsole() | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45270
866