just a few small windows build fixes

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-10-24 11:43:44 +02:00
parent 46f92a639d
commit bb688f7b3b
4 changed files with 14 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-test-utils': patch
---
Ensure recursive deletion of temporary directories in tests
+4
View File
@@ -21,6 +21,10 @@ jest.mock('@backstage/plugin-graphiql', () => ({
GraphiQLIcon: () => null,
}));
// Rarely, and only in windows CI, do these tests take slightly more than the
// default five seconds
jest.setTimeout(15_000);
describe('App', () => {
it('should render', async () => {
process.env = {
@@ -311,7 +311,7 @@ class MockDirectoryImpl {
};
remove = (): void => {
fs.removeSync(this.#root);
fs.rmSync(this.#root, { recursive: true, force: true, maxRetries: 10 });
};
#transformInput(input: MockDirectoryContent[string]): MockEntry[] {
@@ -93,7 +93,7 @@ describe('ConfigSources', () => {
targets: [{ type: 'path', target: '/config.yaml' }],
}),
),
).toEqual([{ name: 'FileConfigSource', path: '/config.yaml' }]);
).toEqual([{ name: 'FileConfigSource', path: `${root}config.yaml` }]);
expect(
mergeSources(
@@ -201,9 +201,9 @@ describe('ConfigSources', () => {
]),
),
).toEqual([
{ name: 'FileConfigSource', path: '/a.yaml' },
{ name: 'FileConfigSource', path: '/b.yaml' },
{ name: 'FileConfigSource', path: '/c.yaml' },
{ name: 'FileConfigSource', path: `${root}a.yaml` },
{ name: 'FileConfigSource', path: `${root}b.yaml` },
{ name: 'FileConfigSource', path: `${root}c.yaml` },
]);
});