From 6acb77bb55700990f9db6e6b759c8e369fc1cac1 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Sat, 30 Mar 2024 13:04:05 +0000 Subject: [PATCH] get rid of jest.setup.js --- yarn-project/foundation/package.json | 5 +---- yarn-project/foundation/src/jest.setup.js | 3 --- yarn-project/foundation/src/log/log_history.test.ts | 2 ++ yarn-project/foundation/src/mutex/mutex.test.ts | 2 ++ yarn-project/foundation/src/serialize/buffer_reader.test.ts | 2 ++ yarn-project/foundation/src/sleep/sleep.test.ts | 2 ++ 6 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 yarn-project/foundation/src/jest.setup.js diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 532858baeb15..dbefd018599c 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -59,10 +59,7 @@ "^(\\.{1,2}/.*)\\.[cm]?js$": "$1" }, "testRegex": "./src/.*\\.test\\.(js|mjs|ts)$", - "rootDir": "./src", - "setupFilesAfterEnv": [ - "./jest.setup.js" - ] + "rootDir": "./src" }, "dependencies": { "@aztec/bb.js": "portal:../../barretenberg/ts", diff --git a/yarn-project/foundation/src/jest.setup.js b/yarn-project/foundation/src/jest.setup.js deleted file mode 100644 index a7b5ecbcdebc..000000000000 --- a/yarn-project/foundation/src/jest.setup.js +++ /dev/null @@ -1,3 +0,0 @@ -import { jest as jestGlobal } from '@jest/globals'; - -global.jest = jestGlobal; diff --git a/yarn-project/foundation/src/log/log_history.test.ts b/yarn-project/foundation/src/log/log_history.test.ts index 3135a513cd79..be2351861aab 100644 --- a/yarn-project/foundation/src/log/log_history.test.ts +++ b/yarn-project/foundation/src/log/log_history.test.ts @@ -1,3 +1,5 @@ +import { afterAll, beforeAll, beforeEach, describe, expect, it, jest } from '@jest/globals'; + import { createDebugOnlyLogger, enableLogs } from './debug.js'; import { LogHistory } from './log_history.js'; diff --git a/yarn-project/foundation/src/mutex/mutex.test.ts b/yarn-project/foundation/src/mutex/mutex.test.ts index c2479a7003bb..647128d2d0c0 100644 --- a/yarn-project/foundation/src/mutex/mutex.test.ts +++ b/yarn-project/foundation/src/mutex/mutex.test.ts @@ -1,3 +1,5 @@ +import { beforeEach, describe, expect, it, jest } from '@jest/globals'; + import { Mutex } from './index.js'; import { type MutexDatabase } from './mutex_database.js'; diff --git a/yarn-project/foundation/src/serialize/buffer_reader.test.ts b/yarn-project/foundation/src/serialize/buffer_reader.test.ts index 43ed9b5b5642..cddc179ef9d1 100644 --- a/yarn-project/foundation/src/serialize/buffer_reader.test.ts +++ b/yarn-project/foundation/src/serialize/buffer_reader.test.ts @@ -1,3 +1,5 @@ +import { beforeEach, describe, expect, it, jest } from '@jest/globals'; + import { randomBytes } from '../crypto/index.js'; import { Fq, Fr } from '../fields/fields.js'; import { BufferReader } from './buffer_reader.js'; diff --git a/yarn-project/foundation/src/sleep/sleep.test.ts b/yarn-project/foundation/src/sleep/sleep.test.ts index f35afc348c82..c7a78098c8ef 100644 --- a/yarn-project/foundation/src/sleep/sleep.test.ts +++ b/yarn-project/foundation/src/sleep/sleep.test.ts @@ -1,3 +1,5 @@ +import { describe, expect, it, jest } from '@jest/globals'; + import { InterruptError } from '../errors/index.js'; import { InterruptibleSleep } from './index.js';