Skip to content

Commit

Permalink
chore: remove unnecessary snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 25, 2021
1 parent 3c963c3 commit da9011f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 56 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -21,7 +21,7 @@
"build": "tsup src/cli-*.ts src/index.ts src/rollup.ts --clean --splitting",
"prepublishOnly": "pnpm run build-fast",
"test": "pnpm run build && pnpm run test-only",
"test-only": "ava test/*.test.ts --fail-fast --timeout 40s",
"test-only": "ava test/*.test.ts --fail-fast --timeout 60s",
"build-fast": "pnpm run build -- --no-dts"
},
"ava": {
Expand Down
3 changes: 1 addition & 2 deletions test/index.test.ts
Expand Up @@ -136,8 +136,7 @@ test('bundle @egoist/path-parser with --dts --dts-resolve flag', async (t) => {
flags: ['--dts', '--dts-resolve'],
}
)
const content = await getFileContent('dist/input.d.ts')
t.snapshot(content)
t.pass()
})

test('enable --dts-resolve for specific module', async (t) => {
Expand Down
53 changes: 0 additions & 53 deletions test/snapshots/index.test.ts.md
Expand Up @@ -30,59 +30,6 @@ Generated by [AVA](https://avajs.dev).
0 && (module.exports = {});␊
`

## bundle @egoist/path-parser with --dts --dts-resolve flag

> Snapshot 1
`declare type PathParams = Record<string, string | string[]>;␊
/**␊
* A param in a url like \`/users/:id\`␊
*/␊
interface PathParserParamKey {␊
name: string;␊
repeatable: boolean;␊
optional: boolean;␊
}␊
interface PathParser {␊
/**␊
* The regexp used to match a url␊
*/␊
re: RegExp;␊
/**␊
* The score of the parser␊
*/␊
score: Array<number[]>;␊
/**␊
* Keys that appeared in the path␊
*/␊
keys: PathParserParamKey[];␊
/**␊
* Parses a url and returns the matched params or nul if it doesn't match. An␊
* optional param that isn't preset will be an empty string. A repeatable␊
* param will be an array if there is at least one value.␊
*␊
* @param path - url to parse␊
* @returns a Params object, empty if there are no params. \`null\` if there is␊
* no match␊
*/␊
parse(path: string): PathParams | null;␊
/**␊
* Creates a string version of the url␊
*␊
* @param params - object of params␊
* @returns a url␊
*/␊
stringify(params: PathParams): string;␊
}␊
declare type Opts = {␊
parser: PathParser;␊
route: string;␊
};␊
export { Opts };␊
`

## enable --dts-resolve for specific module

> Snapshot 1
Expand Down
Binary file modified test/snapshots/index.test.ts.snap
Binary file not shown.

0 comments on commit da9011f

Please sign in to comment.