Skip to content

Commit 5ce68f0

Browse files
committed
updated test to reflect new nls layer form
1 parent 116704f commit 5ce68f0

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

Gruntfile.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,19 @@ module.exports = function (grunt) {
2727
},
2828

2929
intern: {
30-
all: {
30+
sauce: {
3131
options: {
3232
runType: 'runner', // defaults to 'client'
3333
config: 'tests/sauce',
3434
reporters: ['console', 'lcov']
3535
}
36+
},
37+
local: {
38+
options: {
39+
runType: 'runner', // defaults to 'client'
40+
config: 'tests/local',
41+
reporters: ['console', 'lcov']
42+
}
3643
}
3744
}
3845
});
@@ -44,6 +51,6 @@ module.exports = function (grunt) {
4451

4552

4653
// By default, lint and run all tests.
47-
grunt.registerTask("default", ["jsbeautifier", "jshint", "intern"]);
54+
grunt.registerTask("default", ["jsbeautifier", "jshint", "intern:local"]);
4855

4956
};

i18n.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ define(['./i18n/common', "module", "require"], function (common, module, require
1717
bundlesList = [],
1818
confLocalesList,
1919
pluginMid,
20-
20+
2121
// Simple function to mix in properties from source into target,
2222
// but only if target does not already have a property of the same name.
2323
// This is not robust in IE for transferring methods that match
@@ -236,7 +236,7 @@ define(['./i18n/common', "module", "require"], function (common, module, require
236236
},
237237
/* jshint +W074 */
238238

239-
write: function (pluginName, moduleName, write) {
239+
write: function (pluginName, moduleName) {
240240
pluginMid = pluginMid || pluginName;
241241
bundlesList.push(moduleName);
242242
},
@@ -277,7 +277,6 @@ define(['./i18n/common', "module", "require"], function (common, module, require
277277
bundlesList = [];
278278
confLocalesList = undefined;
279279
pluginMid = undefined;
280-
parentRequire = undefined;
281280
};
282281

283282
if (!data.name) {

tests/testApp/dist/myapp/test.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@ require.config({
22
config: {
33
"i18n": {
44
bundlesMap: {
5-
"myapp/nls/bundleA": "myapp/nls/test",
6-
"myapp/nls/bundleB": "myapp/nls/test"
5+
"myapp/nls/test": ["myapp/nls/bundleA", "myapp/nls/bundleB"]
76
},
87
localesMap: {
9-
"myapp/nls/test": {
10-
fr: true,
11-
root: true
12-
}
8+
"myapp/nls/test": ["fr", "root"]
139
}
1410
}
1511
}

0 commit comments

Comments
 (0)