Skip to content

Commit

Permalink
fix(test): path mappings for win and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
zewa666 committed Nov 13, 2018
1 parent a3b9056 commit 561c33e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"src(\\\\|/)df(\\\\|/)df-(.*)": "<rootDir>/src/df/df-$3.ts",
"src(\\\\|/)rt(\\\\|/)rt-(.*)": "<rootDir>/src/rt/rt-$3.ts",
"(test\\\\unit\\\\)aurelia-(.*)": "<rootDir>/node_modules/aurelia-$2",
"locales(\\\\|/)(.*)/(.*).json": "<rootDir>/test/unit/fixtures/locales/$2/$3.json",
"locales(\\\\|/)(.*)(\\\\|/)(.*).json": "<rootDir>/test/unit/fixtures/locales/$2/$4.json",
"^.+\\.(css)$": "<rootDir>/test/jest-css-stub.js"
},
"collectCoverage": true,
Expand Down
13 changes: 0 additions & 13 deletions test/unit/aurelia.integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,6 @@ describe("testing aurelia configure routine", () => {
.inView("<h5 id=" + target + " t=\"hello\">Hello!</h5>")
.boundTo({ mydate: new Date() });

const originalInit = Backend.prototype.init;
Backend.prototype.init = function init(services: any, options: AureliaBackendOptions = {}) {
this.services = services;
this.options = Object.assign({}, {
loadPath: "./fixtures/locales/{{lng}}/{{ns}}.json",
addPath: "locales/add/{{lng}}/{{ns}}",
allowMultiLoading: false,
parse: JSON.parse
}, options);
};

component.bootstrap((aurelia: Aurelia) => {
return aurelia.use
.standardConfiguration()
Expand All @@ -104,8 +93,6 @@ describe("testing aurelia configure routine", () => {
debug: false
});

Backend.prototype.init = originalInit;

component.dispose();
});
});
2 changes: 1 addition & 1 deletion test/unit/staging-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function bootstrapTestEnvironment(

return instance.setup(Object.assign({
backend: { // <-- configure backend settings
loadPath: "./fixtures/locales/{{lng}}/{{ns}}.json", // <-- XHR settings for where to get the files from
loadPath: "./locales/{{lng}}/{{ns}}.json", // <-- XHR settings for where to get the files from
},
interpolation: {
prefix: "{{",
Expand Down

0 comments on commit 561c33e

Please sign in to comment.