Skip to content

Commit

Permalink
chore: move setTimeout outside of async functions
Browse files Browse the repository at this point in the history
ref:
jestjs/jest#11543

Signed-off-by: Dale Lane <dale.lane@uk.ibm.com>
  • Loading branch information
dalelane committed Mar 7, 2024
1 parent fb6e5da commit 923ceef
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/Common.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const generateFolderName = () => {
return path.resolve(MAIN_TEST_RESULT_PATH, crypto.randomBytes(4).toString('hex'));
};

jest.setTimeout(30000);

// Test class Function
test('Creates Class from parameters', () => {
Expand Down Expand Up @@ -146,8 +147,6 @@ test('invalid port', () => {
// Test EnvJson Function

test('EnvJson extracts correct values', async () => {
jest.setTimeout(30000);

const OUTPUT_DIR = generateFolderName();

const generator = new Generator(path.normalize('./'), OUTPUT_DIR, { forceWrite: true, templateParams: params });
Expand All @@ -171,8 +170,6 @@ test('EnvJson extracts correct values', async () => {
// Test ImportModels

test('ImportModels are generated', async () => {
jest.setTimeout(30000);

const OUTPUT_DIR = generateFolderName();

const generator = new Generator(path.normalize('./'), OUTPUT_DIR, { forceWrite: true, templateParams: params });
Expand Down

0 comments on commit 923ceef

Please sign in to comment.