Skip to content

Commit

Permalink
test(cli): enable wrongly commented out TS test (#2374)
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge authored Dec 15, 2023
1 parent 6103717 commit 854765f
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions packages/artillery/test/cli/run-typescript.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ tap.beforeEach(async (t) => {
);
});

// tap.test('Can run a Typescript processor', async (t) => {
// const [exitCode, output] = await execute([
// 'run',
// '-o',
// `${reportFilePath}`,
// 'test/scripts/scenarios-typescript/lodash.yml'
// ]);
tap.test('Can run a Typescript processor', async (t) => {
const [exitCode, output] = await execute([
'run',
'-o',
`${reportFilePath}`,
'test/scripts/scenarios-typescript/lodash.yml'
]);

// t.equal(exitCode, 0, 'CLI should exit with code 0');
// t.ok(
// output.stdout.includes('Got context using lodash: true'),
// 'Should be able to use lodash in a scenario to get context'
// );
// const json = JSON.parse(fs.readFileSync(reportFilePath, 'utf8'));
t.equal(exitCode, 0, 'CLI should exit with code 0');
t.ok(
output.stdout.includes('Got context using lodash: true'),
'Should be able to use lodash in a scenario to get context'
);
const json = JSON.parse(fs.readFileSync(reportFilePath, 'utf8'));

// t.equal(
// json.aggregate.counters['http.codes.200'],
// 2,
// 'Should have made 2 requests'
// );
// t.equal(
// json.aggregate.counters['hey_from_ts'],
// 2,
// 'Should have emitted 2 custom metrics from ts processor'
// );
// });
t.equal(
json.aggregate.counters['http.codes.200'],
2,
'Should have made 2 requests'
);
t.equal(
json.aggregate.counters['hey_from_ts'],
2,
'Should have emitted 2 custom metrics from ts processor'
);
});

tap.test(
'Failure from a Typescript processor has a resolvable stack trace via source maps',
Expand Down

0 comments on commit 854765f

Please sign in to comment.