Skip to content
This repository was archived by the owner on Mar 13, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions frontend/jest.config.js
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
7 changes: 7 additions & 0 deletions frontend/locales/en/strings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"global": {
"menu": {
"home": "Home"
}
}
}
Loading