@@ -220,6 +220,48 @@ describe('dts-generation', () => {
220
220
expect ( generatedContent ) . toBe ( expectedContent )
221
221
} )
222
222
223
+ it ( 'should properly generate types for type example/0004' , async ( ) => {
224
+ const example = '0004'
225
+
226
+ const config : DtsGenerationOption = {
227
+ entrypoints : [ join ( inputDir , `example/${ example } .ts` ) ] ,
228
+ outdir : generatedDir ,
229
+ clean : false ,
230
+ tsconfigPath : join ( __dirname , '..' , 'tsconfig.json' ) ,
231
+ }
232
+
233
+ await generate ( config )
234
+
235
+ const outputPath = join ( outputDir , `${ example } .d.ts` )
236
+ const generatedPath = join ( generatedDir , `${ example } .d.ts` )
237
+
238
+ const expectedContent = await Bun . file ( outputPath ) . text ( )
239
+ const generatedContent = await Bun . file ( generatedPath ) . text ( )
240
+
241
+ expect ( generatedContent ) . toBe ( expectedContent )
242
+ } )
243
+
244
+ it ( 'should properly generate types for type example/0005' , async ( ) => {
245
+ const example = '0005'
246
+
247
+ const config : DtsGenerationOption = {
248
+ entrypoints : [ join ( inputDir , `example/${ example } .ts` ) ] ,
249
+ outdir : generatedDir ,
250
+ clean : false ,
251
+ tsconfigPath : join ( __dirname , '..' , 'tsconfig.json' ) ,
252
+ }
253
+
254
+ await generate ( config )
255
+
256
+ const outputPath = join ( outputDir , `${ example } .d.ts` )
257
+ const generatedPath = join ( generatedDir , `${ example } .d.ts` )
258
+
259
+ const expectedContent = await Bun . file ( outputPath ) . text ( )
260
+ const generatedContent = await Bun . file ( generatedPath ) . text ( )
261
+
262
+ expect ( generatedContent ) . toBe ( expectedContent )
263
+ } )
264
+
223
265
afterEach ( async ( ) => {
224
266
// Clean up generated files
225
267
try {
0 commit comments