config-loader: restore cwd after tests
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -18,6 +18,12 @@ import { createMockDirectory } from '@backstage/backend-test-utils';
|
||||
import { collectConfigSchemas } from './collect';
|
||||
import path from 'path';
|
||||
|
||||
// cwd must be restored
|
||||
const origDir = process.cwd();
|
||||
afterAll(() => {
|
||||
process.chdir(origDir);
|
||||
});
|
||||
|
||||
const mockSchema = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
|
||||
@@ -17,6 +17,12 @@
|
||||
import { createMockDirectory } from '@backstage/backend-test-utils';
|
||||
import { loadConfigSchema } from './load';
|
||||
|
||||
// cwd must be restored
|
||||
const origDir = process.cwd();
|
||||
afterAll(() => {
|
||||
process.chdir(origDir);
|
||||
});
|
||||
|
||||
describe('loadConfigSchema', () => {
|
||||
const mockDir = createMockDirectory();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user