From c9c18966e6f59e8bc16dfd65394041491cba539e Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 5 May 2018 13:56:22 +0900 Subject: [PATCH] global expect --- e2e/contents/scroll.test.js | 1 - e2e/contents/tab.test.js | 1 - e2e/contents/zoom.test.js | 1 - e2e/karma.conf.js | 2 ++ e2e/main.js | 2 ++ 5 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 e2e/main.js diff --git a/e2e/contents/scroll.test.js b/e2e/contents/scroll.test.js index 070529a..0a896b3 100644 --- a/e2e/contents/scroll.test.js +++ b/e2e/contents/scroll.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import * as windows from "../ambassador/src/client/windows"; import * as tabs from "../ambassador/src/client/tabs"; import * as keys from "../ambassador/src/client/keys"; diff --git a/e2e/contents/tab.test.js b/e2e/contents/tab.test.js index 4374907..880deb8 100644 --- a/e2e/contents/tab.test.js +++ b/e2e/contents/tab.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import * as windows from "../ambassador/src/client/windows"; import * as tabs from "../ambassador/src/client/tabs"; import * as keys from "../ambassador/src/client/keys"; diff --git a/e2e/contents/zoom.test.js b/e2e/contents/zoom.test.js index 603e0b6..10b7cca 100644 --- a/e2e/contents/zoom.test.js +++ b/e2e/contents/zoom.test.js @@ -1,4 +1,3 @@ -import { expect } from "chai"; import * as windows from "../ambassador/src/client/windows"; import * as tabs from "../ambassador/src/client/tabs"; import * as keys from "../ambassador/src/client/keys"; diff --git a/e2e/karma.conf.js b/e2e/karma.conf.js index 5ef4646..fcda415 100644 --- a/e2e/karma.conf.js +++ b/e2e/karma.conf.js @@ -4,11 +4,13 @@ module.exports = function (config) { basePath: '', frameworks: ['mocha'], files: [ + 'main.js', 'karma-delay.js', '**/*.test.js' ], preprocessors: { + '**/main.js': ['webpack'], '**/*.test.js': ['webpack'] }, diff --git a/e2e/main.js b/e2e/main.js new file mode 100644 index 0000000..d923aaa --- /dev/null +++ b/e2e/main.js @@ -0,0 +1,2 @@ +import chai from 'chai'; +global.expect = chai.expect;