Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Remove unused I18nShim, fixing Karma warning

Alexander Brandon Colesd4fbbb3f89f3
diff --git a/frontend/karma.conf.js b/frontend/karma.conf.js
index fee88342885..662c975b720 100644
--- a/frontend/karma.conf.js
+++ b/frontend/karma.conf.js
@@ -8,7 +8,6 @@ module.exports = function (config) {
// I18n.js is provided by the Asset pipeline,
// which is unavailable for unit tests.
// For testing, shim its functionality
- 'src/test/i18n-shim.ts',
'node_modules/jquery/dist/jquery.js',
// 'node_modules/angular-mocks/angular-mocks.js'
],
diff --git a/frontend/src/test/i18n-shim.ts b/frontend/src/test/i18n-shim.ts
deleted file mode 100644
index c1f954ba170..00000000000
--- a/frontend/src/test/i18n-shim.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as _ from 'lodash';
-
-export class I18nShim {
- public defaultLocale = 'en';
-
- public firstDayOfWeek = 1;
-
- public locale = 'en';
-
- public translations = {
- en: {},
- };
-
- t<T=string>(key:string):T {
- return `[missing "${key}" translation]` as unknown as T;
- }
-
- lookup():boolean {
- return false;
- }
-
- // Return the input for these helpers
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
- public toNumber = _.identity;
-
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
- public toPercentage = _.identity;
-
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
- public toCurrency = _.identity;
-
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
- public strftime = _.identity;
-
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
- public toHumanSize = _.identity;
-
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment
- public toTime = _.identity;
-}