jest-theories
Advanced tools
Comparing version
@@ -8,2 +8,6 @@ /** | ||
declare function theoretically<T>(description: string | ((theory: T, index: number) => string), theories: T[], testFunction: (theory: T) => Promise<void> | void): void; | ||
declare namespace theoretically { | ||
export function only<T>(description: string | ((theory: T, index: number) => string), theories: T[], testFunction: (theory: T) => Promise<void> | void) : void; | ||
} | ||
export default theoretically; |
import format from 'string-format'; | ||
const theoretically = (testNameCreator, theories, testFunc) => { | ||
const _theoretically = (test) => (testNameCreator, theories, testFunc) => { | ||
if (!test) { | ||
@@ -30,2 +31,6 @@ throw new Error('Jest test global must be accessible to use jest-theories'); | ||
const theoretically = _theoretically(test); | ||
const only = test.only; | ||
theoretically.only = _theoretically(only); | ||
export default theoretically; |
{ | ||
"name": "jest-theories", | ||
"version": "1.3.0", | ||
"version": "1.5.0", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "build": "babel index.js --out-dir dist" |
6862
5.12%62
10.71%