feat: use vitest controlled api-snapshot
This commit is contained in:
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
|
||||
@@ -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)
|
||||
})
|
||||
@@ -1,7 +0,0 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
describe('should', () => {
|
||||
it('exported', () => {
|
||||
expect(1).toEqual(1)
|
||||
})
|
||||
})
|
||||
Reference in new issue
Block a user