feat: use vitest controlled api-snapshot

This commit is contained in:
Anthony Fu committed 2026-04-23 13:37:35 +09:00
1 parent b898f3cf9a
commit 977d3d4066
8 files changed
+71 -25

No files matched your search

@@ -0,0 +1,7 @@
/**
* Generated by tsnapi — public API snapshot of `pkg-placeholder`
*/
// #region Variables
export declare const one: number;
export declare const two: number;
// #endregion
@@ -0,0 +1,7 @@
/**
* Generated by tsnapi — public API snapshot of `pkg-placeholder`
*/
// #region Variables
export var one /* const */
export var two /* const */
// #endregion
+14
View File
@@ -0,0 +1,14 @@
import { fileURLToPath } from 'node:url'
import { guardStaleBuild } from 'tsdown-stale-guard'
import { snapshotApiPerEntry } from 'tsnapi/vitest'
import { beforeAll, describe } from 'vitest'
const root = fileURLToPath(new URL('..', import.meta.url))
describe('api snapshot', () => {
beforeAll(async () => {
await guardStaleBuild({ root })
})
snapshotApiPerEntry(root)
})
-7
View File
@@ -1,7 +0,0 @@
import { describe, expect, it } from 'vitest'
describe('should', () => {
it('exported', () => {
expect(1).toEqual(1)
})
})