Skip to content

Commit

Permalink
fix(typescript): adding test
Browse files Browse the repository at this point in the history
  • Loading branch information
JaCraig committed Oct 23, 2024
1 parent 62f7d81 commit 95aa8cb
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/typescript/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,28 @@ test.serial(
}
);

test.serial(
'ensures declarationDir is allowed in Rollup output directory when output.file is used',
async (t) => {
const bundle = await rollup({
input: 'fixtures/basic/main.ts',
plugins: [
typescript({
tsconfig: 'fixtures/basic/tsconfig.json',
declarationDir: 'fixtures/basic/dist/other',
declaration: true
})
],
onwarn
});

// this should not throw an error
await t.notThrowsAsync(() =>
getCode(bundle, { format: 'es', file: 'fixtures/basic/dist/index.js' }, true)
);
}
);

test.serial(
'ensures output files can be written to subdirectories within the tsconfig outDir',
async (t) => {
Expand Down

0 comments on commit 95aa8cb

Please sign in to comment.