From 93ab8644c4a8b393c27208dade5f11e6632bd861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 26 Jan 2017 10:10:11 +0100 Subject: [PATCH 1/2] Use English when running Mocha tests --- Gruntfile.js | 1 + test/helpers/use-english.js | 10 ++++++++++ test/mocha.opts | 1 + 3 files changed, 12 insertions(+) create mode 100644 test/helpers/use-english.js create mode 100644 test/mocha.opts diff --git a/Gruntfile.js b/Gruntfile.js index 24468780..3670198a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -90,6 +90,7 @@ module.exports = function(grunt) { src: 'test/*.js', options: { reporter: 'dot', + require: require.resolve('./test/helpers/use-english.js'), }, }, 'unit-xml': { diff --git a/test/helpers/use-english.js b/test/helpers/use-english.js new file mode 100644 index 00000000..0d5c81a1 --- /dev/null +++ b/test/helpers/use-english.js @@ -0,0 +1,10 @@ +'use strict'; + +var env = process.env; + +// delete any user-provided language settings +delete env.LC_ALL; +delete env.LC_MESSAGES; +delete env.LANG; +delete env.LANGUAGE; +delete env.STRONGLOOP_GLOBALIZE_APP_LANGUAGE; diff --git a/test/mocha.opts b/test/mocha.opts new file mode 100644 index 00000000..1d836338 --- /dev/null +++ b/test/mocha.opts @@ -0,0 +1 @@ +--require ./test/helpers/use-english From 78f8b9124a11b9f8ffaae23b5f8164f8b8f90511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Thu, 26 Jan 2017 10:10:19 +0100 Subject: [PATCH 2/2] Remove test/support.js from karma config The file no longer exists. --- test/karma.conf.js | 1 - 1 file changed, 1 deletion(-) diff --git a/test/karma.conf.js b/test/karma.conf.js index f0c4d5d0..d9000f4c 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -21,7 +21,6 @@ module.exports = function(config) { // list of files / patterns to load in the browser files: [ 'node_modules/es5-shim/es5-shim.js', - 'test/support.js', 'test/loopback.test.js', 'test/model.test.js', // [rfeng] Browserified common/models/application.js