From 561c33e5dbeafb9b58af4372fcac63a8d77041db Mon Sep 17 00:00:00 2001 From: Vildan Softic Date: Tue, 13 Nov 2018 10:14:07 +0100 Subject: [PATCH] fix(test): path mappings for win and linux --- package.json | 2 +- test/unit/aurelia.integration.spec.ts | 13 ------------- test/unit/staging-helpers.ts | 2 +- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index d7d8d105..55deea30 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "src(\\\\|/)df(\\\\|/)df-(.*)": "/src/df/df-$3.ts", "src(\\\\|/)rt(\\\\|/)rt-(.*)": "/src/rt/rt-$3.ts", "(test\\\\unit\\\\)aurelia-(.*)": "/node_modules/aurelia-$2", - "locales(\\\\|/)(.*)/(.*).json": "/test/unit/fixtures/locales/$2/$3.json", + "locales(\\\\|/)(.*)(\\\\|/)(.*).json": "/test/unit/fixtures/locales/$2/$4.json", "^.+\\.(css)$": "/test/jest-css-stub.js" }, "collectCoverage": true, diff --git a/test/unit/aurelia.integration.spec.ts b/test/unit/aurelia.integration.spec.ts index 9ecd3496..619c763c 100644 --- a/test/unit/aurelia.integration.spec.ts +++ b/test/unit/aurelia.integration.spec.ts @@ -70,17 +70,6 @@ describe("testing aurelia configure routine", () => { .inView("
Hello!
") .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() @@ -104,8 +93,6 @@ describe("testing aurelia configure routine", () => { debug: false }); - Backend.prototype.init = originalInit; - component.dispose(); }); }); diff --git a/test/unit/staging-helpers.ts b/test/unit/staging-helpers.ts index 172668c7..51335124 100644 --- a/test/unit/staging-helpers.ts +++ b/test/unit/staging-helpers.ts @@ -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: "{{",