Skip to content

Commit

Permalink
fix: Solving lint problem
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinuehara committed Sep 23, 2024
1 parent b912d00 commit 427b202
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/es-module/test-typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,14 @@ test('execute a JavaScript file importing a cjs TypeScript file', async () => {

test('execute a TypeScript file with union types', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
'--no-warnings',
fixtures.path('typescript/ts/test-union-types.ts'),
'--experimental-strip-types',
'--no-warnings',
fixtures.path('typescript/ts/test-union-types.ts'),
]);

strictEqual(result.stderr, '');
strictEqual(result.stdout,
'{' +
'{' +
" name: 'Hello, TypeScript!' }\n" +
'{ role: \'admin\', permission: \'all\' }\n' +
'{\n foo: \'Testing Partial Type\',\n bar: 42,\n' +
Expand All @@ -358,14 +358,14 @@ test('execute a TypeScript file with union types', async () => {

test('expect error when executing a TypeScript file with generics', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-strip-types',
fixtures.path('typescript/ts/test-parameter-properties.ts'),
'--experimental-strip-types',
fixtures.path('typescript/ts/test-parameter-properties.ts'),
]);

// This error should be thrown during transformation
match(
result.stderr,
/TypeScript parameter property is not supported in strip-only mode/
result.stderr,
/TypeScript parameter property is not supported in strip-only mode/
);
strictEqual(result.stdout, '');
strictEqual(result.code, 1);
Expand Down

0 comments on commit 427b202

Please sign in to comment.