diff options
author | Robert Jaros <rjaros@finn.pl> | 2019-02-17 16:04:18 +0100 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2019-02-17 16:04:18 +0100 |
commit | d0e47e1bfb32f14b2613d353e1df7c11ad51cb61 (patch) | |
tree | 55b5528a11d79e84a29df7498f144c3410c40012 /build.gradle | |
parent | 8eb8d09db5b68972de4507df33c13a2dee738cf3 (diff) | |
download | kvision-d0e47e1bfb32f14b2613d353e1df7c11ad51cb61.tar.gz kvision-d0e47e1bfb32f14b2613d353e1df7c11ad51cb61.tar.bz2 kvision-d0e47e1bfb32f14b2613d353e1df7c11ad51cb61.zip |
Fixed tests with headless Chrome.
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index 705fe84a..69d5470a 100644 --- a/build.gradle +++ b/build.gradle @@ -139,6 +139,7 @@ if (!project.gradle.startParameter.taskNames.contains("dokka")) { dependency("element-resize-event", "3.0.3") dependency("navigo", "7.0.0") devDependency("karma", "3.1.4") + devDependency("karma-chrome-launcher", "2.2.0") devDependency("qunit", "2.8.0") } @@ -147,7 +148,10 @@ if (!project.gradle.startParameter.taskNames.contains("dokka")) { contentPath = file('src/main/web') mode = production ? "production" : "development" } - + karma { + plugins = ["karma-chrome-launcher"] + browsers = ["ChromeHeadless"] + } define "PRODUCTION", production } @@ -233,6 +237,7 @@ if (!project.gradle.startParameter.taskNames.contains("dokka")) { afterEvaluate { tasks.getByName("webpack-bundle") { dependsOn(copyResources) } tasks.getByName("webpack-run") { dependsOn(copyResources) } + tasks.getByName("test") { dependsOn(copyResources, copyResourcesForTests) } tasks.getByName("karma-start") { dependsOn(copyResources, copyResourcesForTests) } } } |