Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Dec 3, 2024
1 parent 4a49ca3 commit 1bf3a21
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion napi/transform/test/transform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ describe('simple', () => {
assert.equal(ret.code, 'export class A {}\n');
});

it('uses the `declaration option`', () => {
it('uses the `declaration` option', () => {
const ret = transform('test.ts', code, { typescript: { declaration: {} } });
assert.equal(ret.declaration, 'export declare class A<T> {}\n');
});

it('uses the `sourcemap` option', () => {
const ret = transform('test.ts', code, { typescript: { declaration: {} }, sourcemap: true });
assert(ret.declarationMap);
});
});

describe('transform', () => {
Expand Down

0 comments on commit 1bf3a21

Please sign in to comment.