scaffolder-backend: update tests to work with Jest 27

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-03-24 13:17:33 +01:00
parent e9530e06b6
commit 9e1efd4d99
2 changed files with 4 additions and 1 deletions
@@ -25,6 +25,9 @@ import { ConfigReader } from '@backstage/config';
import { TaskContext, TaskSecrets } from './types';
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
// The Stream module is lazy loaded, so make sure it's in the module cache before mocking fs
void winston.transports.Stream;
const realFiles = Object.fromEntries(
[
resolvePackagePath(
@@ -187,7 +187,7 @@ describe('StorageTaskBroker', () => {
.mockRejectedValue(new Error('nah m8'));
const intervalId = setInterval(() => {
broker.vacuumTasks({ timeoutS: 2 }).catch(fail);
broker.vacuumTasks({ timeoutS: 2 });
}, 500);
for (;;) {