Skip to content

Commit

Permalink
Maybe fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaya committed Oct 30, 2024
1 parent 9355f65 commit 374509c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions task/tests/integration/integration-tests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ describe('LighthouseV1 suite', function () {
];

for (const testName of testNames) {
it(testName, done => {
it(testName, async () => {
const testPath = path.join(__dirname, testName + '.js');
const taskJsonPath = path.join(__dirname, '..', '..', 'src', 'task.json');
const tr = new MockTestRunner(testPath, taskJsonPath);

// As of today (2023-03-12), azure-pipelines-task-lib testing framework doesn't support Node 18
// https://github.com/microsoft/azure-pipelines-task-lib/blob/149de35abb4ee930cf512c3d88d9178f277fb3fe/node/mock-test.ts#L156
tr.run(16);

assert(tr.invokedToolCount === 1, 'Should have only run lighthouse');
assert(tr.succeeded, 'Task should have succeeded, stdout: ' + tr.stdout);

done();
tr.runAsync(16).then(() => {
assert(tr.invokedToolCount === 1, 'Should have only run lighthouse');
assert(tr.succeeded, 'Task should have succeeded, stdout: ' + tr.stdout);
});
});
}
});

0 comments on commit 374509c

Please sign in to comment.