Skip to content

Commit

Permalink
check if its related to class inside namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Aug 12, 2024
1 parent 891fa12 commit e65928c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 42 deletions.
31 changes: 16 additions & 15 deletions test/es-module/test-typescript-transform.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,14 @@ test('reconstruct error of a TypeScript file with transformation enabled and sou
strictEqual(result.code, 1);
});

test('reconstruct error of a complex TypeScript file with transformation enabled and sourcemaps', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-transform-types',
'--no-warnings',
fixtures.path('typescript/ts/transformation/test-complex-stacktrace.ts'),
]);
match(result.stderr, /test-complex-stacktrace\.ts:27:7/);
strictEqual(result.stdout, '');
strictEqual(result.code, 1);
});

test('reconstruct error of a complex TypeScript file with transformation enabled without sourcemaps', async () => {
test('reconstruct error of a TypeScript file with transformation enabled without sourcemaps', async () => {
const result = await spawnPromisified(process.execPath, [
'--experimental-transform-types',
'--no-enable-source-maps',
'--no-warnings',
fixtures.path('typescript/ts/transformation/test-complex-stacktrace.ts'),
fixtures.path('typescript/ts/transformation/test-enum-stacktrace.ts'),
]);
// The stack trace is not reconstructed without sourcemaps.
match(result.stderr, /test-complex-stacktrace\.ts:33:7/);
match(result.stderr, /test-enum-stacktrace\.ts:5:7/);
strictEqual(result.stdout, '');
strictEqual(result.code, 1);
});
Expand Down Expand Up @@ -113,3 +101,16 @@ test('execute a TypeScript file with modern typescript syntax', async () => {
match(result.stdout, /Hello, TypeScript!/);
strictEqual(result.code, 0);
});

test('execute a transpiled JavaScript file', async () => {
const result = await spawnPromisified(process.execPath, [
'--enable-source-maps',
'--no-warnings',
fixtures.path('typescript/ts/transformation/test-transformed-typescript.js'),
]);

match(result.stderr, /Stacktrace at line 28/);
match(result.stderr, /test-failing-arm64\.js:28:7/);
strictEqual(result.stdout, '');
strictEqual(result.code, 1);
});

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e65928c

Please sign in to comment.