This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
works-on-my-machine/tests/it.test.ts
Marc Cataford ec2e46e04d
build: run tests using actual build (#23)
* build: run tests using actual build

* build: build script that includes hashbang prepending

* ci: missing /bin/zsh
2023-04-15 01:28:59 -04:00

14 lines
424 B
TypeScript

import assert from 'assert'
import { it, test, expect, describe } from 'works-on-my-machine'
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))
})
})