返回 slidev
api-snapshots.test.ts
根目录 / test / api-snapshots.test.ts
1 import { fileURLToPath } from 'node:url'
2 import { guardStaleBuild } from 'tsdown-stale-guard'
3 import { describePackagesApiSnapshots } from 'tsnapi/vitest'
4
5 await describePackagesApiSnapshots({
6 packages: [
7 fileURLToPath(new URL('../packages/types', import.meta.url)),
8 fileURLToPath(new URL('../packages/parser', import.meta.url)),
9 ],
10 async beforeEach({ packageRoot }) {
11 await guardStaleBuild({ root: packageRoot })
12 },
13 })
14
14 lines TYPESCRIPT