diff --git a/suite-common/test-utils/src/conditionalDescribe.ts b/suite-common/test-utils/src/conditionalDescribe.ts new file mode 100644 index 00000000000..ee70ed3fa6c --- /dev/null +++ b/suite-common/test-utils/src/conditionalDescribe.ts @@ -0,0 +1,11 @@ +export const conditionalDescribe = ( + skipCondition: boolean, + title: string, + fn: jest.EmptyFunction, +) => { + if (skipCondition) { + describe.skip(title, fn); + } else { + describe(title, fn); + } +}; diff --git a/suite-common/test-utils/src/index.ts b/suite-common/test-utils/src/index.ts index 89f6c6d0d3a..f23a2cd13a3 100644 --- a/suite-common/test-utils/src/index.ts +++ b/suite-common/test-utils/src/index.ts @@ -1,3 +1,4 @@ export * from './mocks'; export * from './configureMockStore'; export * from './extraDependenciesMock'; +export * from './conditionalDescribe';