Skip to content

Commit

Permalink
test: remove redundant test
Browse files Browse the repository at this point in the history
The test is not checking the stacktraces as described. Would require
intercepting the error object at the point it gets tracked via
a metric - not straightforward.
  • Loading branch information
hassy committed Feb 29, 2024
1 parent 016424a commit 1d1371f
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions packages/artillery/test/cli/run-typescript.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,33 +95,3 @@ tap.test('Runs correctly when package is marked as external', async (t) => {

await deleteFile(bundleLocation);
});

tap.test(
'Failure from a Typescript processor has a resolvable stack trace via source maps',
async (t) => {
const [_exitCode, output] = await execute([
'run',
'-o',
`${reportFilePath}`,
'test/scripts/scenarios-typescript/error.yml'
]);

t.ok(
output.stdout.includes('error_from_ts_processor'),
'Should have logged error from ts processor'
);

// // Search for the path
// const pathRegex = /\((.*?):\d+:\d+\)/;
// const match = output.stdout.match(pathRegex);

// // Extract the path if found
// const extractedPath = match ? match[1] : null;

// t.ok(
// extractedPath.includes('.ts'),
// 'Should be using source maps to resolve the path to a .ts file'
// );
// t.ok(fs.existsSync(extractedPath), 'Error path should exist');
}
);

0 comments on commit 1d1371f

Please sign in to comment.