mirror of
https://github.com/bitwarden/browser
synced 2026-01-28 15:23:53 +00:00
fix polyfill location dependenc on jest config location
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/* eslint-env node */
|
||||
const path = require("path");
|
||||
|
||||
/** @type {import('jest').Config} */
|
||||
module.exports = {
|
||||
@@ -15,7 +16,7 @@ module.exports = {
|
||||
// Also anecdotally improves performance when run locally
|
||||
maxWorkers: 3,
|
||||
|
||||
setupFiles: ["<rootDir>/../../libs/shared/polyfill-node-globals.ts"],
|
||||
setupFiles: [path.join(__dirname, "polyfill-node-globals.ts")],
|
||||
|
||||
transform: {
|
||||
"^.+\\.tsx?$": [
|
||||
|
||||
@@ -8,7 +8,6 @@ module.exports = {
|
||||
...sharedConfig,
|
||||
preset: "ts-jest",
|
||||
testEnvironment: "jsdom",
|
||||
setupFiles: ["<rootDir>/../../../../../libs/shared/polyfill-node-globals.ts"],
|
||||
moduleNameMapper: pathsToModuleNameMapper(
|
||||
{ "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user