Skip to content

Commit

Permalink
feat: add empty Alerts Page + mock API behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
flxwu committed Dec 29, 2023
1 parent 0be0628 commit dbab01d
Show file tree
Hide file tree
Showing 15 changed files with 643 additions and 12 deletions.
8 changes: 6 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ const config = {
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-confusing-void-expression": "off",
}
},
},
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: path.join(__dirname, "tsconfig.json"),
},
plugins: ["@typescript-eslint"],
plugins: [
"@typescript-eslint",
"eslint-plugin-testing-library",
"eslint-plugin-jest-dom",
],
extends: ["next/core-web-vitals"],
ignorePatterns: ["generated/**/*"],
rules: {
Expand Down
15 changes: 13 additions & 2 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,26 @@ const serverTestConfig = {
testEnvironment: "jest-environment-node",
};

// To avoid the "Cannot use import statement outside a module" errors while transforming ESM.
const esModules = ["superjson"];
const transformIgnorePatterns = [`/node_modules/(?!(${esModules.join("|")})/)`];
// Add any custom config to be passed to Jest
/** @type {import('jest').Config} */
const config = {
// Add more setup options before each test is run
silent: false,
verbose: true,
projects: [
await createJestConfig(clientTestConfig)(),
await createJestConfig(serverTestConfig)(),
{
...(await createJestConfig(clientTestConfig)()),
transformIgnorePatterns,
setupFilesAfterEnv: ["<rootDir>/setup-jest.js"],
},
{
...(await createJestConfig(serverTestConfig)()),
transformIgnorePatterns,
setupFilesAfterEnv: ["<rootDir>/setup-jest.js"],
},
],
};

Expand Down

0 comments on commit dbab01d

Please sign in to comment.