Skip to content

Commit 2a84772

Browse files
committed
fix: typecheck
1 parent 9ae7af1 commit 2a84772

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

test/dts-auto.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { afterAll, beforeAll, describe, expect, it } from 'bun:test'
22
import fs from 'node:fs'
33
import path from 'node:path'
4-
import type { DtsOptions } from '../src'
4+
import type { OnLoadResult, PluginBuilder } from 'bun'
55
import { dts, generate } from '../src/index'
66

77
const tempDir = path.resolve(process.cwd(), 'test-temp')
@@ -117,11 +117,17 @@ describe('bun-plugin-dts-auto', () => {
117117
expect(plugin.name).toBe('bun-plugin-dts-auto')
118118
expect(typeof plugin.setup).toBe('function')
119119

120-
const mockBuild = {
120+
const mockBuild: PluginBuilder = {
121121
config: {
122-
entrypoints: [path.relative(tempDir, path.join(srcDir, 'sample.ts'))],
123-
root: path.relative(tempDir, srcDir),
124-
outdir: path.relative(tempDir, outDir),
122+
entrypoints: ['path/to/entry'],
123+
root: 'path/to/root',
124+
outdir: 'path/to/outdir',
125+
plugins: [plugin],
126+
},
127+
onLoad: () => {},
128+
onResolve: () => {},
129+
module: (specifier: string, callback: () => OnLoadResult | Promise<OnLoadResult>) => {
130+
callback()
125131
},
126132
}
127133

0 commit comments

Comments
 (0)