From 40f727774cd304bad2546fbbb8e23702910b0880 Mon Sep 17 00:00:00 2001 From: Misha Kaletsky <15040698+mmkal@users.noreply.github.com> Date: Sun, 23 Oct 2022 23:40:55 +0000 Subject: [PATCH] Snapshot test all the negated usage examples --- .gitignore | 4 + README.md | 13 +- test/errors.test.ts | 344 +++++++++++++++++++++++++- test/{index.test.ts => usage.test.ts} | 0 4 files changed, 355 insertions(+), 6 deletions(-) rename test/{index.test.ts => usage.test.ts} (100%) diff --git a/.gitignore b/.gitignore index 0d7d8e5..861f3e6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ node_modules dist *ignoreme* coverage + +# ignore non-pnpm lockfiles +package-lock.json +yarn.lock diff --git a/README.md b/README.md index 1cb418e..f2bb1b1 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ See below for lots more examples. - [Jest & `eslint-plugin-jest`](#jest--eslint-plugin-jest) - [Similar projects](#similar-projects) - [Comparison](#comparison) +- [Contributing](#contributing) ## Installation and usage @@ -54,7 +55,7 @@ The `expectTypeOf` method takes a single argument, or a generic parameter. Neith ### Features - + Check an object's type with `.toEqualTypeOf`: ```typescript @@ -473,3 +474,13 @@ The key differences in this project are: - assertions on types "matching" rather than exact type equality, for "is-a" relationships e.g. `expectTypeOf(square).toMatchTypeOf()` - built into existing tooling. No extra build step, cli tool, IDE extension, or lint plugin is needed. Just import the function and start writing tests. Failures will be at compile time - they'll appear in your IDE and when you run `tsc`. - small implementation with no dependencies. <200 lines of code - [take a look!](./src/index.ts) (tsd, for comparison, is [2.6MB](https://bundlephobia.com/result?p=tsd@0.13.1) because it ships a patched version of typescript). + +## Contributing + +In most cases, it's worth checking existing issues or creating on to discuss a new feature or a bug fix before opening a pull request. + +Once you're ready to make a pull request: clone the repo, and install pnpm if you don't have it already with `npm install --global pnpm`. Lockfiles for `npm` and `yarn` are gitignored. + +If you're adding a feature, you should write a self-contained usage example in the form of a test, in [test/usage.test.ts](./test/usage.test.ts). This file is used to populate the bulk of this readme using [eslint-plugin-codegen](https://npmjs.com/package/eslint-plugin-codegen), and to generate an ["errors" test file](./test/errors.test.ts), which captures the error messages that are emitted for failing assertions by the typescript compiler. So, the test name should be written as a human-readable sentence explaining the usage example. Have a look at the existing tests for an idea of the style. + +After adding the tests, run `npm run lint -- --fix` to update the readme, and `npm test -- --updateSnapshot` to update the errors test. The generated documentation and tests should be pushed to the same branch as the source code, and submitted as a pull request. CI will test that the docs and tests are up to date if you forget to run these commands. diff --git a/test/errors.test.ts b/test/errors.test.ts index 69e7c49..d2cc07e 100644 --- a/test/errors.test.ts +++ b/test/errors.test.ts @@ -1,10 +1,11 @@ +import * as fs from 'fs' import stripAnsi from 'strip-ansi' import * as tsmorph from 'ts-morph' const tsErrors = (code: string) => { const project = new tsmorph.Project() project.addSourceFileAtPath('./src/index.ts') - project.createSourceFile('test.ts', `import {expectTypeOf} from './src'\n\n${code}`) + project.createSourceFile('./test/test.ts', `import {expectTypeOf} from '../src'\n\n${code}`) const diagnostics = project.getPreEmitDiagnostics() const formatted = project.formatDiagnosticsWithColorAndContext(diagnostics) return stripAnsi(formatted) @@ -12,7 +13,7 @@ const tsErrors = (code: string) => { test('toEqualTypeOf<...>() error message', async () => { expect(tsErrors(`expectTypeOf({a: 1}).toEqualTypeOf<{a: string}>()`)).toMatchInlineSnapshot(` - "test.ts:3:22 - error TS2554: Expected 1 arguments, but got 0. + "test/test.ts:3:22 - error TS2554: Expected 1 arguments, but got 0. 3 expectTypeOf({a: 1}).toEqualTypeOf<{a: string}>() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -27,7 +28,7 @@ test('toEqualTypeOf<...>() error message', async () => { test('toEqualTypeOf(...) error message', async () => { expect(tsErrors(`expectTypeOf({a: 1}).toEqualTypeOf({a: 'one'})`)).toMatchInlineSnapshot(` - "test.ts:3:36 - error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type 'never'. + "test/test.ts:3:36 - error TS2345: Argument of type '{ a: string; }' is not assignable to parameter of type 'never'. 3 expectTypeOf({a: 1}).toEqualTypeOf({a: 'one'}) ~~~~~~~~~~ @@ -37,7 +38,7 @@ test('toEqualTypeOf(...) error message', async () => { test('toMatchTypeOf<...>() error message', async () => { expect(tsErrors(`expectTypeOf({a: 1}).toMatchTypeOf<{a: string}>()`)).toMatchInlineSnapshot(` - "test.ts:3:22 - error TS2554: Expected 1 arguments, but got 0. + "test/test.ts:3:22 - error TS2554: Expected 1 arguments, but got 0. 3 expectTypeOf({a: 1}).toMatchTypeOf<{a: string}>() ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -52,7 +53,7 @@ test('toMatchTypeOf<...>() error message', async () => { test('toMatchTypeOf(...) error message', async () => { expect(tsErrors(`expectTypeOf({a: 1}).toMatchTypeOf({a: 'one'})`)).toMatchInlineSnapshot(` - "test.ts:3:22 - error TS2554: Expected 2 arguments, but got 1. + "test/test.ts:3:22 - error TS2554: Expected 2 arguments, but got 1. 3 expectTypeOf({a: 1}).toMatchTypeOf({a: 'one'}) ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -64,3 +65,336 @@ test('toMatchTypeOf(...) error message', async () => { " `) }) + +test('usage test', () => { + // remove all `.not`s and `// @ts-expect-error`s from the main test file and snapshot the errors + const usageTestFile = fs + .readFileSync(__filename.replace('errors.test.ts', 'usage.test.ts')) + .toString() + .split('\n') + .map(line => line.replace('// @ts-expect-error', '// error on next line:').replace('.not.', '.')) + .join('\n') + const project = new tsmorph.Project() + project.addSourceFileAtPath('./src/index.ts') + project.createSourceFile('./test/usage.test.ts', usageTestFile, {overwrite: true}) + const diagnostics = project.getPreEmitDiagnostics() + const formatted = stripAnsi(project.formatDiagnosticsWithColorAndContext(diagnostics)) + + expect(formatted).toMatchInlineSnapshot(` + "test/usage.test.ts:21:30 - error TS2554: Expected 1 arguments, but got 0. + + 21 expectTypeOf({a: 1, b: 1}).toEqualTypeOf<{a: number}>() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:35:25 - error TS2554: Expected 1 arguments, but got 0. + + 35 expectTypeOf().toMatchTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:114:16 + 114 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:38:25 - error TS2554: Expected 1 arguments, but got 0. + + 38 expectTypeOf().toEqualTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:42:24 - error TS2554: Expected 2 arguments, but got 1. + + 42 expectTypeOf({a: 1}).toMatchTypeOf({b: 1}) + ~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:115:36 + 115 (expected: Expected, ...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:51:25 - error TS2554: Expected 1 arguments, but got 0. + + 51 expectTypeOf().toMatchTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:114:16 + 114 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:52:25 - error TS2554: Expected 1 arguments, but got 0. + + 52 expectTypeOf().toEqualTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:61:25 - error TS2554: Expected 1 arguments, but got 0. + + 61 expectTypeOf().toBeNumber() + ~~~~~~~~~~~~ + + src/index.ts:105:16 + 105 toBeNumber: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:65:43 - error TS2554: Expected 1 arguments, but got 0. + + 65 expectTypeOf<{deeply: {nested: any}}>().toEqualTypeOf<{deeply: {nested: unknown}}>() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:83:27 - error TS2554: Expected 1 arguments, but got 0. + + 83 expectTypeOf(undefined).toBeNullable() + ~~~~~~~~~~~~~~ + + src/index.ts:112:18 + 112 toBeNullable: (...MISMATCH: MismatchArgs>>, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:87:22 - error TS2554: Expected 1 arguments, but got 0. + + 87 expectTypeOf(null).toBeNullable() + ~~~~~~~~~~~~~~ + + src/index.ts:112:18 + 112 toBeNullable: (...MISMATCH: MismatchArgs>>, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:90:33 - error TS2554: Expected 1 arguments, but got 0. + + 90 expectTypeOf<1 | undefined>().toBeNullable() + ~~~~~~~~~~~~~~ + + src/index.ts:112:18 + 112 toBeNullable: (...MISMATCH: MismatchArgs>>, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:91:28 - error TS2554: Expected 1 arguments, but got 0. + + 91 expectTypeOf<1 | null>().toBeNullable() + ~~~~~~~~~~~~~~ + + src/index.ts:112:18 + 112 toBeNullable: (...MISMATCH: MismatchArgs>>, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:92:40 - error TS2554: Expected 1 arguments, but got 0. + + 92 expectTypeOf<1 | undefined | null>().toBeNullable() + ~~~~~~~~~~~~~~ + + src/index.ts:112:18 + 112 toBeNullable: (...MISMATCH: MismatchArgs>>, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:96:19 - error TS2554: Expected 1 arguments, but got 0. + + 96 expectTypeOf(1).toBeUnknown() + ~~~~~~~~~~~~~ + + src/index.ts:100:17 + 100 toBeUnknown: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:97:19 - error TS2554: Expected 1 arguments, but got 0. + + 97 expectTypeOf(1).toBeAny() + ~~~~~~~~~ + + src/index.ts:99:13 + 99 toBeAny: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:98:19 - error TS2554: Expected 1 arguments, but got 0. + + 98 expectTypeOf(1).toBeNever() + ~~~~~~~~~~~ + + src/index.ts:101:15 + 101 toBeNever: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:99:19 - error TS2554: Expected 1 arguments, but got 0. + + 99 expectTypeOf(1).toBeNull() + ~~~~~~~~~~ + + src/index.ts:110:14 + 110 toBeNull: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:100:19 - error TS2554: Expected 1 arguments, but got 0. + + 100 expectTypeOf(1).toBeUndefined() + ~~~~~~~~~~~~~~~ + + src/index.ts:111:19 + 111 toBeUndefined: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:101:19 - error TS2554: Expected 1 arguments, but got 0. + + 101 expectTypeOf(1).toBeNullable() + ~~~~~~~~~~~~~~ + + src/index.ts:112:18 + 112 toBeNullable: (...MISMATCH: MismatchArgs>>, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:106:35 - error TS2554: Expected 1 arguments, but got 0. + + 106 expectTypeOf().toMatchTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:114:16 + 114 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:130:71 - error TS2554: Expected 2 arguments, but got 1. + + 130 expectTypeOf>().exclude().toHaveProperty('xxl') + ~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:125:5 + 125 ...MISMATCH: MismatchArgs, B> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:147:21 - error TS2554: Expected 2 arguments, but got 1. + + 147 expectTypeOf(obj).toHaveProperty('c') + ~~~~~~~~~~~~~~~~~~~ + + src/index.ts:125:5 + 125 ...MISMATCH: MismatchArgs, B> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:152:41 - error TS2554: Expected 1 arguments, but got 0. + + 152 expectTypeOf(obj).toHaveProperty('a').toBeString() + ~~~~~~~~~~~~ + + src/index.ts:106:16 + 106 toBeString: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:159:27 - error TS2554: Expected 1 arguments, but got 0. + + 159 expectTypeOf().toEqualTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:179:19 - error TS2554: Expected 1 arguments, but got 0. + + 179 expectTypeOf(f).toBeAny() + ~~~~~~~~~ + + src/index.ts:99:13 + 99 toBeAny: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:180:27 - error TS2554: Expected 1 arguments, but got 0. + + 180 expectTypeOf(f).returns.toBeAny() + ~~~~~~~~~ + + src/index.ts:99:13 + 99 toBeAny: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:183:46 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'. + + 183 expectTypeOf(f).parameter(0).toEqualTypeOf('1') + ~~~ + test/usage.test.ts:231:43 - error TS2345: Argument of type '(this: { name: string; }, message: string) => string' is not assignable to parameter of type 'never'. + + 231 expectTypeOf(greetFormal).toEqualTypeOf(greetCasual) + ~~~~~~~~~~~ + test/usage.test.ts:246:33 - error TS2554: Expected 1 arguments, but got 0. + + 246 expectTypeOf([1, 2, 3]).items.toBeString() + ~~~~~~~~~~~~ + + src/index.ts:106:16 + 106 toBeString: (...MISMATCH: MismatchArgs, B>) => true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:258:31 - error TS2554: Expected 1 arguments, but got 0. + + 258 expectTypeOf<{a: string}>().toEqualTypeOf<{a: number}>() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:263:32 - error TS2554: Expected 1 arguments, but got 0. + + 263 expectTypeOf<{a?: number}>().toEqualTypeOf<{a: number}>() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:264:32 - error TS2554: Expected 1 arguments, but got 0. + + 264 expectTypeOf<{a?: number}>().toEqualTypeOf<{a: number | undefined}>() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:265:39 - error TS2554: Expected 1 arguments, but got 0. + + 265 expectTypeOf<{a?: number | null}>().toEqualTypeOf<{a: number | null}>() + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:274:22 - error TS2554: Expected 1 arguments, but got 0. + + 274 expectTypeOf().toEqualTypeOf() + ~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:280:22 - error TS2554: Expected 1 arguments, but got 0. + + 280 expectTypeOf().toEqualTypeOf() + ~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + test/usage.test.ts:297:28 - error TS2554: Expected 1 arguments, but got 0. + + 297 expectTypeOf().toEqualTypeOf() + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/index.ts:118:16 + 118 (...MISMATCH: MismatchArgs, B>): true + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Arguments for the rest parameter 'MISMATCH' were not provided. + " + `) +}) diff --git a/test/index.test.ts b/test/usage.test.ts similarity index 100% rename from test/index.test.ts rename to test/usage.test.ts