From d74fcb45a37e2f962a6b2082068cd191b9263a23 Mon Sep 17 00:00:00 2001 From: Alex <41288429+Dvinyanin@users.noreply.github.com> Date: Thu, 13 Oct 2022 15:16:39 +0700 Subject: [PATCH] Add lang UT (#2297) Signed-off-by: Dvinyanin Alexandr --- packages/core/package.json | 4 +-- packages/core/src/__tests__/lang.test.ts | 6 +++++ packages/platform/package.json | 4 +-- packages/platform/src/index.ts | 1 + packages/platform/src/testUtils.ts | 26 +++++++++++++++++++ packages/text-editor/package.json | 1 - packages/theme/package.json | 4 +-- packages/ui/package.json | 6 ++--- plugins/activity-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/activity-assets/tsconfig.json | 4 ++- plugins/attachment-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/attachment-assets/tsconfig.json | 4 ++- plugins/automation-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/automation-assets/tsconfig.json | 4 ++- plugins/board-assets/package.json | 1 + .../board-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/board-assets/tsconfig.json | 4 ++- plugins/calendar-assets/lang/ru.json | 2 ++ plugins/calendar-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/calendar-assets/tsconfig.json | 4 ++- plugins/chunter-assets/lang/ru.json | 1 + plugins/chunter-assets/package.json | 1 + .../chunter-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/chunter-assets/tsconfig.json | 4 ++- plugins/client-resources/package.json | 4 +-- plugins/client/package.json | 4 +-- plugins/contact-assets/package.json | 1 + .../contact-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/contact-assets/tsconfig.json | 4 ++- plugins/contact/package.json | 4 +-- plugins/gmail-assets/package.json | 1 + .../gmail-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/gmail-assets/tsconfig.json | 4 ++- plugins/hr-assets/lang/en.json | 1 + plugins/hr-assets/package.json | 1 + plugins/hr-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/hr-assets/tsconfig.json | 4 ++- plugins/inventory-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/inventory-assets/tsconfig.json | 4 ++- plugins/lead-assets/package.json | 1 + .../lead-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/lead-assets/tsconfig.json | 4 ++- plugins/login-assets/package.json | 1 + .../login-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/login-assets/tsconfig.json | 4 ++- plugins/notification-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/notification-assets/tsconfig.json | 4 ++- plugins/notification/package.json | 4 +-- plugins/preference-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/preference-assets/tsconfig.json | 4 ++- plugins/preference/package.json | 4 +-- plugins/recruit-assets/package.json | 1 + .../recruit-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/recruit-assets/tsconfig.json | 4 ++- plugins/setting-assets/lang/en.json | 2 +- plugins/setting-assets/lang/ru.json | 3 +++ plugins/setting-assets/package.json | 1 + .../setting-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/setting-assets/tsconfig.json | 4 ++- plugins/tags-assets/lang/ru.json | 1 + plugins/tags-assets/package.json | 1 + .../tags-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/tags-assets/tsconfig.json | 4 ++- plugins/task-assets/package.json | 1 + .../task-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/task-assets/tsconfig.json | 4 ++- plugins/telegram-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/telegram-assets/tsconfig.json | 4 ++- plugins/templates-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/templates-assets/tsconfig.json | 4 ++- plugins/tracker-assets/package.json | 1 + .../tracker-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/tracker-assets/tsconfig.json | 4 ++- plugins/view-assets/package.json | 1 + .../view-assets/src/__tests__/lang.test.ts | 6 +++++ plugins/view-assets/tsconfig.json | 4 ++- plugins/view/package.json | 4 +-- plugins/workbench-assets/package.json | 1 + .../src/__tests__/lang.test.ts | 6 +++++ plugins/workbench-assets/tsconfig.json | 4 ++- templates/assets/package.json | 2 ++ templates/assets/src/__tests__/lang.test.ts | 6 +++++ templates/assets/tsconfig.json | 4 ++- 92 files changed, 304 insertions(+), 47 deletions(-) create mode 100644 packages/core/src/__tests__/lang.test.ts create mode 100644 packages/platform/src/testUtils.ts create mode 100644 plugins/activity-assets/src/__tests__/lang.test.ts create mode 100644 plugins/attachment-assets/src/__tests__/lang.test.ts create mode 100644 plugins/automation-assets/src/__tests__/lang.test.ts create mode 100644 plugins/board-assets/src/__tests__/lang.test.ts create mode 100644 plugins/calendar-assets/src/__tests__/lang.test.ts create mode 100644 plugins/chunter-assets/src/__tests__/lang.test.ts create mode 100644 plugins/contact-assets/src/__tests__/lang.test.ts create mode 100644 plugins/gmail-assets/src/__tests__/lang.test.ts create mode 100644 plugins/hr-assets/src/__tests__/lang.test.ts create mode 100644 plugins/inventory-assets/src/__tests__/lang.test.ts create mode 100644 plugins/lead-assets/src/__tests__/lang.test.ts create mode 100644 plugins/login-assets/src/__tests__/lang.test.ts create mode 100644 plugins/notification-assets/src/__tests__/lang.test.ts create mode 100644 plugins/preference-assets/src/__tests__/lang.test.ts create mode 100644 plugins/recruit-assets/src/__tests__/lang.test.ts create mode 100644 plugins/setting-assets/src/__tests__/lang.test.ts create mode 100644 plugins/tags-assets/src/__tests__/lang.test.ts create mode 100644 plugins/task-assets/src/__tests__/lang.test.ts create mode 100644 plugins/telegram-assets/src/__tests__/lang.test.ts create mode 100644 plugins/templates-assets/src/__tests__/lang.test.ts create mode 100644 plugins/tracker-assets/src/__tests__/lang.test.ts create mode 100644 plugins/view-assets/src/__tests__/lang.test.ts create mode 100644 plugins/workbench-assets/src/__tests__/lang.test.ts create mode 100644 templates/assets/src/__tests__/lang.test.ts diff --git a/packages/core/package.json b/packages/core/package.json index c00b4186f3..0eef7656ac 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -30,8 +30,8 @@ "dependencies": { "@hcengineering/platform": "^0.6.7" }, - "repository":"https://github.com/hcengineering/anticrm", + "repository": "https://github.com/hcengineering/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/packages/core/src/__tests__/lang.test.ts b/packages/core/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..e50f7d767c --- /dev/null +++ b/packages/core/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../lang/${lang}.json`)) +) diff --git a/packages/platform/package.json b/packages/platform/package.json index 83c56a5013..08ed4654bc 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -29,8 +29,8 @@ "dependencies": { "intl-messageformat": "^9.7.1" }, - "repository":"https://github.com/hcengineering/anticrm", + "repository": "https://github.com/hcengineering/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/packages/platform/src/index.ts b/packages/platform/src/index.ts index 09dde212be..1c0d568e1e 100644 --- a/packages/platform/src/index.ts +++ b/packages/platform/src/index.ts @@ -25,6 +25,7 @@ export * from './resource' export * from './i18n' export * from './metadata' export * from './rpc' +export * from './testUtils' addStringsLoader(platformId, async (lang: string) => { return await import(`./lang/${lang}.json`) diff --git a/packages/platform/src/testUtils.ts b/packages/platform/src/testUtils.ts new file mode 100644 index 0000000000..c15880b9cc --- /dev/null +++ b/packages/platform/src/testUtils.ts @@ -0,0 +1,26 @@ +import { Loader } from './i18n' + +function makeLocaleMatcher (target: object): object { + return Object.entries(target).reduce( + (obj, [key, value]) => ({ + ...obj, + [key]: typeof value === 'string' ? expect.any(String) : makeLocaleMatcher(value) + }), + {} + ) +} + +const langs = ['en', 'ru'] + +/** + * @public + * @param loader - + * @returns + */ +export function makeLocalesTest (loader: Loader) { + return async () => { + const [target, ...rest] = await Promise.all(langs.map(loader)) + const matcher = makeLocaleMatcher(target) + rest.forEach((loc) => expect(loc).toEqual(matcher)) + } +} diff --git a/packages/text-editor/package.json b/packages/text-editor/package.json index 0bb1331fdc..f86d9d30bd 100644 --- a/packages/text-editor/package.json +++ b/packages/text-editor/package.json @@ -35,7 +35,6 @@ "@hcengineering/platform": "^0.6.7", "@hcengineering/core": "^0.6.17", "@hcengineering/ui": "^0.6.2", - "svelte": "^3.47", "@tiptap/core": "~2.0.0-beta.181", "@tiptap/starter-kit": "~2.0.0-beta.190", diff --git a/packages/theme/package.json b/packages/theme/package.json index 4bf71c6368..865778497e 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -33,8 +33,8 @@ "svelte": "^3.47", "@hcengineering/platform": "^0.6.7" }, - "repository":"https://github.com/hcenginneing/anticrm", + "repository": "https://github.com/hcenginneing/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/packages/ui/package.json b/packages/ui/package.json index 6e99a523fa..98f236dfca 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -36,10 +36,10 @@ "@hcengineering/platform": "^0.6.7", "@hcengineering/theme": "^0.6.1", "@hcengineering/core": "^0.6.17", - "svelte": "^3.47" + "svelte": "^3.47" }, - "repository":"https://github.com/hcenginneing/anticrm", + "repository": "https://github.com/hcenginneing/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/activity-assets/package.json b/plugins/activity-assets/package.json index 6219c4f928..826e644164 100644 --- a/plugins/activity-assets/package.json +++ b/plugins/activity-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/activity-assets/src/__tests__/lang.test.ts b/plugins/activity-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/activity-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/activity-assets/tsconfig.json b/plugins/activity-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/activity-assets/tsconfig.json +++ b/plugins/activity-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/attachment-assets/package.json b/plugins/attachment-assets/package.json index 2983681329..b71b59b910 100644 --- a/plugins/attachment-assets/package.json +++ b/plugins/attachment-assets/package.json @@ -8,6 +8,7 @@ "scripts": { "build": "heft build", "build:docs": "", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/attachment-assets/src/__tests__/lang.test.ts b/plugins/attachment-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/attachment-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/attachment-assets/tsconfig.json b/plugins/attachment-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/attachment-assets/tsconfig.json +++ b/plugins/attachment-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/automation-assets/package.json b/plugins/automation-assets/package.json index 6fdb1dfabe..a8d5d642c8 100644 --- a/plugins/automation-assets/package.json +++ b/plugins/automation-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/automation-assets/src/__tests__/lang.test.ts b/plugins/automation-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/automation-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/automation-assets/tsconfig.json b/plugins/automation-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/automation-assets/tsconfig.json +++ b/plugins/automation-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/board-assets/package.json b/plugins/board-assets/package.json index 3e95050a1e..30d4f05316 100644 --- a/plugins/board-assets/package.json +++ b/plugins/board-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/board-assets/src/__tests__/lang.test.ts b/plugins/board-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/board-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/board-assets/tsconfig.json b/plugins/board-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/board-assets/tsconfig.json +++ b/plugins/board-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/calendar-assets/lang/ru.json b/plugins/calendar-assets/lang/ru.json index 347734748e..ad1f64cbdb 100644 --- a/plugins/calendar-assets/lang/ru.json +++ b/plugins/calendar-assets/lang/ru.json @@ -31,6 +31,8 @@ "CreateReminder": "Создать напоминание", "CreatedReminder": "Создал напоминание", "Reminders": "Напоминания", + "Shift": "Сдвиг", + "State": "Состояние", "NoReminders": "Нет напоминаний", "AllDay": "Весь день", "AndMore": "И еще {count}", diff --git a/plugins/calendar-assets/package.json b/plugins/calendar-assets/package.json index da79b40c14..a3e265a2f7 100644 --- a/plugins/calendar-assets/package.json +++ b/plugins/calendar-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/calendar-assets/src/__tests__/lang.test.ts b/plugins/calendar-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/calendar-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/calendar-assets/tsconfig.json b/plugins/calendar-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/calendar-assets/tsconfig.json +++ b/plugins/calendar-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/chunter-assets/lang/ru.json b/plugins/chunter-assets/lang/ru.json index ca8a9a42de..f63ff00ccf 100644 --- a/plugins/chunter-assets/lang/ru.json +++ b/plugins/chunter-assets/lang/ru.json @@ -30,6 +30,7 @@ "Replies": "Ответы", "LastReply": "Последний ответ", "RepliesCount": "{replies, plural, =1 {# ответ} =2 {# ответа} =3 {# ответа} =4 {# ответа} other {# ответов}}", + "Topic": "Топик", "Thread": "Обсуждение", "Threads": "Обсуждения", "New": "Новое", diff --git a/plugins/chunter-assets/package.json b/plugins/chunter-assets/package.json index 63878d9245..da7c6195db 100644 --- a/plugins/chunter-assets/package.json +++ b/plugins/chunter-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/chunter-assets/src/__tests__/lang.test.ts b/plugins/chunter-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/chunter-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/chunter-assets/tsconfig.json b/plugins/chunter-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/chunter-assets/tsconfig.json +++ b/plugins/chunter-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/client-resources/package.json b/plugins/client-resources/package.json index c0b2dec6c2..3b07dfec55 100644 --- a/plugins/client-resources/package.json +++ b/plugins/client-resources/package.json @@ -30,8 +30,8 @@ "@hcengineering/core": "^0.6.17", "@hcengineering/client": "^0.6.3" }, - "repository":"https://github.com/hcengineering/anticrm", + "repository": "https://github.com/hcengineering/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/client/package.json b/plugins/client/package.json index 8ba36c1eb0..1ddbd208d2 100644 --- a/plugins/client/package.json +++ b/plugins/client/package.json @@ -29,8 +29,8 @@ "@hcengineering/platform": "^0.6.7", "@hcengineering/core": "^0.6.17" }, - "repository":"https://github.com/hcengineering/anticrm", + "repository": "https://github.com/hcengineering/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/contact-assets/package.json b/plugins/contact-assets/package.json index 14ba385759..a69491c149 100644 --- a/plugins/contact-assets/package.json +++ b/plugins/contact-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/contact-assets/src/__tests__/lang.test.ts b/plugins/contact-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/contact-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/contact-assets/tsconfig.json b/plugins/contact-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/contact-assets/tsconfig.json +++ b/plugins/contact-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/contact/package.json b/plugins/contact/package.json index f77f7322cc..dabd34ef81 100644 --- a/plugins/contact/package.json +++ b/plugins/contact/package.json @@ -31,8 +31,8 @@ "@hcengineering/core": "^0.6.17", "@hcengineering/view": "^0.6.1" }, - "repository":"https://github.com/hcengineering/anticrm", + "repository": "https://github.com/hcengineering/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/gmail-assets/package.json b/plugins/gmail-assets/package.json index 3045ac7539..357dff846d 100644 --- a/plugins/gmail-assets/package.json +++ b/plugins/gmail-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/gmail-assets/src/__tests__/lang.test.ts b/plugins/gmail-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/gmail-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/gmail-assets/tsconfig.json b/plugins/gmail-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/gmail-assets/tsconfig.json +++ b/plugins/gmail-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/hr-assets/lang/en.json b/plugins/hr-assets/lang/en.json index d32dac1cc1..b145ad1819 100644 --- a/plugins/hr-assets/lang/en.json +++ b/plugins/hr-assets/lang/en.json @@ -32,6 +32,7 @@ "EditRequest": "Edit {type}", "Request": "Request", "Staff": "Worker", + "Member": "Member", "Members": "Members", "NoMembers": "No members added", "AddMember": "Add member" diff --git a/plugins/hr-assets/package.json b/plugins/hr-assets/package.json index e42fb59ff9..e5ea29cc0d 100644 --- a/plugins/hr-assets/package.json +++ b/plugins/hr-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/hr-assets/src/__tests__/lang.test.ts b/plugins/hr-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/hr-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/hr-assets/tsconfig.json b/plugins/hr-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/hr-assets/tsconfig.json +++ b/plugins/hr-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/inventory-assets/package.json b/plugins/inventory-assets/package.json index a53ade6c3b..300180ac9b 100644 --- a/plugins/inventory-assets/package.json +++ b/plugins/inventory-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/inventory-assets/src/__tests__/lang.test.ts b/plugins/inventory-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/inventory-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/inventory-assets/tsconfig.json b/plugins/inventory-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/inventory-assets/tsconfig.json +++ b/plugins/inventory-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/lead-assets/package.json b/plugins/lead-assets/package.json index 160066a545..cc58099bbc 100644 --- a/plugins/lead-assets/package.json +++ b/plugins/lead-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/lead-assets/src/__tests__/lang.test.ts b/plugins/lead-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/lead-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/lead-assets/tsconfig.json b/plugins/lead-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/lead-assets/tsconfig.json +++ b/plugins/lead-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/login-assets/package.json b/plugins/login-assets/package.json index ab61507a75..487dc5da19 100644 --- a/plugins/login-assets/package.json +++ b/plugins/login-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/login-assets/src/__tests__/lang.test.ts b/plugins/login-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/login-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/login-assets/tsconfig.json b/plugins/login-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/login-assets/tsconfig.json +++ b/plugins/login-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/notification-assets/package.json b/plugins/notification-assets/package.json index a58dee2cfc..18fc08d74a 100644 --- a/plugins/notification-assets/package.json +++ b/plugins/notification-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/notification-assets/src/__tests__/lang.test.ts b/plugins/notification-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/notification-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/notification-assets/tsconfig.json b/plugins/notification-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/notification-assets/tsconfig.json +++ b/plugins/notification-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/notification/package.json b/plugins/notification/package.json index 2865b0e046..bd3886689f 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -36,8 +36,8 @@ "@hcengineering/core": "^0.6.17", "@hcengineering/ui": "^0.6.2" }, - "repository":"https://github.com/hcengineering/anticrm", + "repository": "https://github.com/hcengineering/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/preference-assets/package.json b/plugins/preference-assets/package.json index 4d069b8845..6ce1d43b67 100644 --- a/plugins/preference-assets/package.json +++ b/plugins/preference-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/preference-assets/src/__tests__/lang.test.ts b/plugins/preference-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/preference-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/preference-assets/tsconfig.json b/plugins/preference-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/preference-assets/tsconfig.json +++ b/plugins/preference-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/preference/package.json b/plugins/preference/package.json index 5d927a3740..6f9e3ff56b 100644 --- a/plugins/preference/package.json +++ b/plugins/preference/package.json @@ -30,8 +30,8 @@ "@hcengineering/core": "^0.6.17", "@hcengineering/ui": "^0.6.2" }, - "repository":"https://github.com/hcenginneing/anticrm", + "repository": "https://github.com/hcenginneing/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/recruit-assets/package.json b/plugins/recruit-assets/package.json index 01c3986e31..4e37ddbc18 100644 --- a/plugins/recruit-assets/package.json +++ b/plugins/recruit-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/recruit-assets/src/__tests__/lang.test.ts b/plugins/recruit-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/recruit-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/recruit-assets/tsconfig.json b/plugins/recruit-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/recruit-assets/tsconfig.json +++ b/plugins/recruit-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/setting-assets/lang/en.json b/plugins/setting-assets/lang/en.json index c4c37f3c04..876cc8c8b9 100644 --- a/plugins/setting-assets/lang/en.json +++ b/plugins/setting-assets/lang/en.json @@ -37,7 +37,7 @@ "DeleteAttributeExistConfirm": "Do you want to delete this attribute? Data will be lost", "DeleteMixin": "Delete Mixin", "DeleteMixinConfirm": "Do you want to delete this mixin?", - "DeleteMixinExistConfirm": "Do you wany yo delete this mixin? Data will not be available", + "DeleteMixinExistConfirm": "Do you want to delete this mixin? Data will not be available", "Attribute": "Attribute", "Custom": "Custom", "Type": "Type", diff --git a/plugins/setting-assets/lang/ru.json b/plugins/setting-assets/lang/ru.json index 2ae6bb4667..e624ab1514 100644 --- a/plugins/setting-assets/lang/ru.json +++ b/plugins/setting-assets/lang/ru.json @@ -35,6 +35,9 @@ "DeleteAttribute": "Удалить атрибут", "DeleteAttributeConfirm": "Вы действительно хотите удалить этот атрибут?", "DeleteAttributeExistConfirm": "Вы действительно хотите удалить этот атрибут? Данные будут утеряны", + "DeleteMixin": "Удалить Миксин", + "DeleteMixinConfirm": "Вы действительно хотите удалить этот Миксин?", + "DeleteMixinExistConfirm": "Вы действительно хотите удалить этот Миксин? Данные будут утеряны", "Attribute": "Атрибут", "Custom": "Пользовательский", "Type": "Тип", diff --git a/plugins/setting-assets/package.json b/plugins/setting-assets/package.json index f349355a0d..7718448d4e 100644 --- a/plugins/setting-assets/package.json +++ b/plugins/setting-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/setting-assets/src/__tests__/lang.test.ts b/plugins/setting-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/setting-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/setting-assets/tsconfig.json b/plugins/setting-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/setting-assets/tsconfig.json +++ b/plugins/setting-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/tags-assets/lang/ru.json b/plugins/tags-assets/lang/ru.json index de7fe0b29d..84b6b73b63 100644 --- a/plugins/tags-assets/lang/ru.json +++ b/plugins/tags-assets/lang/ru.json @@ -30,6 +30,7 @@ "CategoryTagsLabel": "Теги категории", "OtherCategoryLabel": "Другое", "AllCategories": "Все категории", + "DefaultLabel": "Категория по умолчанию", "SelectAll": "Выбрать все", "SelectNone": "Выбрать ничего", "ApplyTags": "Применить" diff --git a/plugins/tags-assets/package.json b/plugins/tags-assets/package.json index 0f4de00729..54d253dab4 100644 --- a/plugins/tags-assets/package.json +++ b/plugins/tags-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/tags-assets/src/__tests__/lang.test.ts b/plugins/tags-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/tags-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/tags-assets/tsconfig.json b/plugins/tags-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/tags-assets/tsconfig.json +++ b/plugins/tags-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/task-assets/package.json b/plugins/task-assets/package.json index ee8ace4998..e052ef14c2 100644 --- a/plugins/task-assets/package.json +++ b/plugins/task-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/task-assets/src/__tests__/lang.test.ts b/plugins/task-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/task-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/task-assets/tsconfig.json b/plugins/task-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/task-assets/tsconfig.json +++ b/plugins/task-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/telegram-assets/package.json b/plugins/telegram-assets/package.json index 540b3c7a77..c8c4d45439 100644 --- a/plugins/telegram-assets/package.json +++ b/plugins/telegram-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/telegram-assets/src/__tests__/lang.test.ts b/plugins/telegram-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/telegram-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/telegram-assets/tsconfig.json b/plugins/telegram-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/telegram-assets/tsconfig.json +++ b/plugins/telegram-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/templates-assets/package.json b/plugins/templates-assets/package.json index f544ccea28..e83197ae7e 100644 --- a/plugins/templates-assets/package.json +++ b/plugins/templates-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/templates-assets/src/__tests__/lang.test.ts b/plugins/templates-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/templates-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/templates-assets/tsconfig.json b/plugins/templates-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/templates-assets/tsconfig.json +++ b/plugins/templates-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/tracker-assets/package.json b/plugins/tracker-assets/package.json index aea7ccbfad..4b82dd9e17 100644 --- a/plugins/tracker-assets/package.json +++ b/plugins/tracker-assets/package.json @@ -7,6 +7,7 @@ "template": "@hcengineering/assets-package", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/tracker-assets/src/__tests__/lang.test.ts b/plugins/tracker-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/tracker-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/tracker-assets/tsconfig.json b/plugins/tracker-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/tracker-assets/tsconfig.json +++ b/plugins/tracker-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/view-assets/package.json b/plugins/view-assets/package.json index a49a1a1359..d1a6abf7d6 100644 --- a/plugins/view-assets/package.json +++ b/plugins/view-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "build:docs": "", "lint": "eslint src", "lint:fix": "eslint --fix src", diff --git a/plugins/view-assets/src/__tests__/lang.test.ts b/plugins/view-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/view-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/view-assets/tsconfig.json b/plugins/view-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/view-assets/tsconfig.json +++ b/plugins/view-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/plugins/view/package.json b/plugins/view/package.json index 6342903d57..eb3decab43 100644 --- a/plugins/view/package.json +++ b/plugins/view/package.json @@ -31,8 +31,8 @@ "@hcengineering/ui": "^0.6.2", "@hcengineering/preference": "^0.6.1" }, - "repository":"https://github.com/hcenginneing/anticrm", + "repository": "https://github.com/hcenginneing/anticrm", "publishConfig": { - "registry":"https://npm.pkg.github.com" + "registry": "https://npm.pkg.github.com" } } diff --git a/plugins/workbench-assets/package.json b/plugins/workbench-assets/package.json index 33ccf2a6bb..323d8dad04 100644 --- a/plugins/workbench-assets/package.json +++ b/plugins/workbench-assets/package.json @@ -7,6 +7,7 @@ "license": "EPL-2.0", "scripts": { "build": "heft build", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", diff --git a/plugins/workbench-assets/src/__tests__/lang.test.ts b/plugins/workbench-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/workbench-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/workbench-assets/tsconfig.json b/plugins/workbench-assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/plugins/workbench-assets/tsconfig.json +++ b/plugins/workbench-assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true, diff --git a/templates/assets/package.json b/templates/assets/package.json index d2d03f770b..79c27e824b 100644 --- a/templates/assets/package.json +++ b/templates/assets/package.json @@ -4,6 +4,7 @@ "scripts": { "build": "heft build", "build:docs": "", + "test": "heft test", "lint": "eslint src", "lint:fix": "eslint --fix src", "format": "prettier --write src && eslint --fix src", @@ -25,6 +26,7 @@ }, "#replaces": [ ".eslintrc.js", + "tsconfig.json", "config/rig.json" ] } diff --git a/templates/assets/src/__tests__/lang.test.ts b/templates/assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/templates/assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/templates/assets/tsconfig.json b/templates/assets/tsconfig.json index 0980a1b8b4..e161b20ea1 100644 --- a/templates/assets/tsconfig.json +++ b/templates/assets/tsconfig.json @@ -2,7 +2,9 @@ "compilerOptions": { "moduleResolution": "node", "target": "esnext", - "module": "esnext", + "module": "commonjs", + "sourceMap": true, + "types": ["node", "heft-jest"], "declaration": true, "outDir": "./lib", "strict": true,