mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
chore: Enable/disable Docker testing with a flag.
This commit is contained in:
committed by
Joachim Van Herwegen
parent
5f4f4b08b0
commit
fe870f073a
@@ -214,3 +214,10 @@ export class FileTestHelper {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
export const describeIf = (envFlag: string, name: string, fn: () => void): void => {
|
||||
const flag = `TEST_${envFlag.toUpperCase()}`;
|
||||
const enabled = !/^(|0|false)$/iu.test(process.env[flag] ?? '');
|
||||
// eslint-disable-next-line jest/valid-describe, jest/valid-title, jest/no-disabled-tests
|
||||
return enabled ? describe(name, fn) : describe.skip(name, fn);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user