From da9277ca5371d50b473612270cf675d8f4966c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabrice=20PENHO=C3=8BT?= Date: Tue, 18 Jan 2022 18:15:33 +0100 Subject: [PATCH] =?UTF-8?q?Revue=20configuration=20karma.js,=20notamment?= =?UTF-8?q?=20pour=20chargement=20local=20des=20vid=C3=A9os=20pour=20les?= =?UTF-8?q?=20tests=20+=20test=20dans=20version=20headless=20des=20navigat?= =?UTF-8?q?eurs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- karma.conf.js | 6 ++++-- tests/vCarouselSpec.ts | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 8113af7..2ee1698 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -12,7 +12,9 @@ module.exports = function(config) { frameworks: ["jasmine", "karma-typescript"], // list of files / patterns to load in the browser - files: [ "src/vCarousel.ts", "tests/*.ts" ], + files: [ "src/vCarousel.ts", "tests/*.ts", { pattern: 'public/videos/*', watched: true, included: false, served: true } ], + + proxies: { "/videos/": "http://localhost:9876/base/public/videos/" }, // list of files / patterns to exclude exclude: [ @@ -45,7 +47,7 @@ module.exports = function(config) { // start these browsers // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher - browsers: ['Firefox', 'Chromium'], + browsers: ['FirefoxHeadless', 'ChromiumHeadless'], // Continuous Integration mode // if true, Karma captures browsers, runs the tests and exits diff --git a/tests/vCarouselSpec.ts b/tests/vCarouselSpec.ts index b9ecbcf..c5636a1 100644 --- a/tests/vCarouselSpec.ts +++ b/tests/vCarouselSpec.ts @@ -4,7 +4,7 @@ const errors=require("../src/errors.js"); describe("vCarousel", () => { let vCarouselTest : vCarousel; - const videosWebDir="https://forge.chapril.org/Fab_Blab/vCarousel/src/branch/master/public/videos"; + const videosWebDir="hhttp://localhost:9876/videos"; const fixture="
"; beforeEach(() =>