app.service("AppConstantsBase", function () {
// common constants here
}
../Scripts/services/fr/app-constants.js
app.service('AppConstants', ['AppConstantsBase', function (appConstantsBase) {
// french constants here
}
../Scripts/services/en/app-constants.js
app.service('AppConstants', ['AppConstantsBase', function (appConstantsBase) {
// english constants here
}
In TestFrenchSpec.js
///<reference path="~/ref/fr/spec-references.js"/>
describe("FR", function() {
beforeEach(function() {
}
it("should do something for french language", function() {
// test with french constants
}
}
In TestEnglishSpec.js
///<reference path="~/ref/en/spec-references.js"/>
describe("EN", function() {
beforeEach(function() {
}
it("should do something for english language", function() {
// test with english constants
}
}
Hi,
I'm using Version: 4.3.3.0.
In chutzpath.json, I have:
Note that english app-constant is defined last.
../Scripts/services/app-constants.js
../Scripts/services/fr/app-constants.js
../Scripts/services/en/app-constants.js
In TestFrenchSpec.js
In TestEnglishSpec.js
In "~/ref/fr/spec-references.js",
When I run the tests, the French tests fail, because it has English constants instead of French ones... English tests work fine.
Thanks.