Marc Cataford
2bc6d94507
* feat: add each support for test, describe * docs: document test * feat: label templating basic support * refactor: group test exports together * refactor: leverage each in repetitive tests * chore: pinned node -> alias * test: coverage for it, test
14 lines
411 B
TypeScript
14 lines
411 B
TypeScript
import assert from 'assert'
|
|
|
|
import { it, test, expect, describe } from '../src'
|
|
|
|
describe.each([it, test])('Runs tests', (fn: unknown) => {
|
|
const testFn = fn as typeof test
|
|
testFn('Runs a test', () => {
|
|
assert.doesNotThrow(() => expect(1).toEqual(1))
|
|
})
|
|
|
|
testFn.each([1, 2, 3])('Supports parametrization (value=%s)', (value: unknown) => {
|
|
assert.doesNotThrow(() => expect(value).toEqual(value))
|
|
})
|
|
})
|