Skip to content
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
2 changes: 1 addition & 1 deletion components/languageSelector/LanguageSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { twMerge } from 'tailwind-merge';

import i18nextConfig from '@/next-i18next.config';
import i18nextConfig from '@/next-i18next.config.cjs';

import type { SelectProps } from '../form/Select';
import IconLanguage from '../icons/Language';
Expand Down
2 changes: 1 addition & 1 deletion components/navigation/MobileNavMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Link from 'next/link';
import React, { useState } from 'react';

import i18nextConfig from '@/next-i18next.config';
import i18nextConfig from '@/next-i18next.config.cjs';

import { SearchButton } from '../AlgoliaSearch';
import IconLanguage from '../icons/Language';
Expand Down
15 changes: 10 additions & 5 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
module.exports = {
const config = {
transform: {
'^.+\\.[t|j]sx?$': ['babel-jest', { configFile: './tests/babel.test.config.cjs' }]
},
verbose: true,
collectCoverage: true,
coverageReporters: ['text', 'lcov', 'json-summary'],
coverageDirectory: 'coverage',
collectCoverageFrom: ['scripts/**/*.js'],
coveragePathIgnorePatterns: ['scripts/compose.js', 'scripts/tools/categorylist.js', 'scripts/tools/tags-color.js'],
// To disallow netlify edge function tests from running
testMatch: ['**/tests/**/*.test.*', '!**/netlify/**/*.test.*']
collectCoverageFrom: ['scripts/**/*.ts'],
coveragePathIgnorePatterns: ['scripts/compose.ts', 'scripts/tools/categorylist.ts', 'scripts/tools/tags-color.ts'],
testMatch: ['**/tests/**/*.test.*', '!**/netlify/**/*.test.*'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json']
};

export default config;
17 changes: 17 additions & 0 deletions next-i18next.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// The file is required to be named next-i18next.config.cjs so we can use it in next.config.js.
// https://github.com/i18next/next-i18next/issues/2185#issuecomment-1618307556
process.env.I18NEXT_DEFAULT_CONFIG_PATH = './next-i18next.config.cjs';

module.exports = {
i18n: {
locales: ['en', 'de'],
defaultLocale: 'en',
namespaces: ['landing-page', 'common', 'tools'],
defaultNamespace: 'landing-page',
react: { useSuspense: false } // this line
},
langMap: {
en: 'English',
de: 'Deutsch'
}
};
13 changes: 0 additions & 13 deletions next-i18next.config.js

This file was deleted.

Loading
Loading