scaffolder-backend: update tests to work with Jest 27
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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 (;;) {
|
||||
|
||||
Reference in New Issue
Block a user