-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jest, i18n and react-query (#175)
Add jest, i18n and react-query
- Loading branch information
1 parent
ddff143
commit a6f1e2a
Showing
10 changed files
with
14,363 additions
and
5,324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
const merge = require('lodash/merge'); | ||
const nextJest = require('next/jest') | ||
const awsuiPreset = require('@awsui/jest-preset/jest-preset'); | ||
|
||
const createJestConfig = nextJest({ | ||
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
dir: './', | ||
}) | ||
|
||
// Add any custom config to be passed to Jest | ||
const customJestConfig = { | ||
// Add more setup options before each test is run | ||
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], | ||
// if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work | ||
moduleDirectories: ['node_modules', '<rootDir>/'], | ||
testEnvironment: 'jest-environment-jsdom', | ||
} | ||
|
||
async function mergePolarisPreset() { | ||
const nextConfig = await createJestConfig(customJestConfig)() | ||
const mergedConfig = merge({}, nextConfig, awsuiPreset) | ||
|
||
return mergedConfig | ||
} | ||
|
||
module.exports = mergePolarisPreset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"global": { | ||
"menu": { | ||
"home": "Home" | ||
} | ||
} | ||
} |
Oops, something went wrong.