mirror of
https://github.com/strapi/strapi.git
synced 2025-08-31 12:23:05 +00:00
fix add-missing-keys-to-other-language.test.js
This commit is contained in:
parent
6d265c2917
commit
9d0a01a051
@ -59,7 +59,9 @@ module.exports = {
|
||||
},
|
||||
transformIgnorePatterns: ['node_modules/(?!(react-dnd|dnd-core|react-dnd-html5-backend)/)'],
|
||||
testMatch: ['/**/tests/**/?(*.)+(spec|test).[jt]s?(x)'],
|
||||
testURL: 'http://localhost:1337/admin',
|
||||
testEnvironmentOptions: {
|
||||
url: 'http://localhost:1337/admin',
|
||||
},
|
||||
// Use `jest-watch-typeahead` version 0.6.5. Newest version 1.0.0 does not support jest@26
|
||||
// Reference: https://github.com/jest-community/jest-watch-typeahead/releases/tag/v1.0.0
|
||||
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
|
||||
|
@ -2,5 +2,8 @@ const baseConfig = require('./jest.base-config.front');
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
projects: ['<rootDir>/packages/**/jest.config.front.js'],
|
||||
projects: [
|
||||
'<rootDir>/packages/**/jest.config.front.js',
|
||||
'<rootDir>/scripts/**/jest.config.front.js',
|
||||
],
|
||||
};
|
||||
|
@ -5,8 +5,8 @@ const { updateMissingKeysToJSON } = require('../add-missing-keys-to-other-langua
|
||||
|
||||
describe('updateMissingKeysToJSON', () => {
|
||||
it('should add missing keys from en.json to translation file', async () => {
|
||||
const TARGET_TRANSLATION_FILE_PATH = 'scripts/front/__tests__/vi.json';
|
||||
const SOURCE_TRANSLATION_FILE_PATH = 'scripts/front/__tests__/en.json';
|
||||
const TARGET_TRANSLATION_FILE_PATH = 'scripts/front/tests/vi.json';
|
||||
const SOURCE_TRANSLATION_FILE_PATH = 'scripts/front/tests/en.json';
|
||||
// Save original `vi.json` file content
|
||||
const originalTargetTranslationFileContent = fs.readFileSync(
|
||||
TARGET_TRANSLATION_FILE_PATH,
|
8
scripts/jest.config.front.js
Normal file
8
scripts/jest.config.front.js
Normal file
@ -0,0 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
const baseConfig = require('../jest.base-config.front');
|
||||
|
||||
module.exports = {
|
||||
...baseConfig,
|
||||
roots: [__dirname],
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user