Skip to content

Commit

Permalink
chore: Removed phantomjs dependency (#1204)
Browse files Browse the repository at this point in the history
* chore: Removed phantomjs dependency

Added support for chrome headless

Signed-off-by: ossdev07 <[email protected]>

* Update karma.conf.js

* Update Makefile
  • Loading branch information
ossdev07 authored and keithamus committed Nov 9, 2018
1 parent 26c8a79 commit 929c109
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 146 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ node_modules: package.json
# Tests
#

test: test-node test-phantom
test: test-node test-chrome

test-node: node_modules
@printf "==> [Test :: Node.js]\n"
Expand All @@ -61,10 +61,10 @@ test-cov: node_modules
--require ./test/bootstrap \
$(TESTS) \

test-phantom: clean-browser chai.js
@printf "==> [Test :: Karma (PhantomJS)]\n"
test-chrome: clean-browser chai.js
@printf "==> [Test :: Karma (chrome)]\n"
@./node_modules/karma/bin/karma start \
--single-run --browsers PhantomJS
--single-run --browsers HeadlessChrome

test-firefox: clean-browser chai.js
@printf "==> [Test :: Karma (Firefox)]\n"
Expand Down Expand Up @@ -101,6 +101,6 @@ clean-cov:
#

.PHONY: all
.PHONY: test test-all test-node test-phantom test-sauce test-cov
.PHONY: test test-all test-node test-chrome test-sauce test-cov
.PHONY: clean clean-node clean-browser clean-cov
.PHONY: release-patch release-minor release-major
8 changes: 7 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ module.exports = function(config) {
, colors: true
, logLevel: config.LOG_INFO
, autoWatch: false
, browsers: [ 'PhantomJS' ]
, browsers: [ 'HeadlessChrome' ]
, customLaunchers: {
HeadlessChrome: {
base: 'ChromeHeadless'
, flags: [ '--no-sandbox',]
, }
, }
, browserDisconnectTimeout: 10000
, browserDisconnectTolerance: 2
, browserNoActivityTimeout: 20000
Expand Down
Loading

0 comments on commit 929c109

Please sign in to comment.