Commit Graph

16 Commits

Author SHA1 Message Date
Rob Wu 3f4f0b9ef5 fix(travis): Run tests with Node 10 instead of 8 (#238)
CI is currently failing because package.json refers chromedriver
^80.0.1, which also matches 80.0.2.

In 80.0.2, chromedriver updated the `extract-zip` dependency:
16151de4c7

extract-zip 2.0.0 has dropped support for Node <10, e.g. by using APIs
that were introduced in Node 10:
https://github.com/maxogden/extract-zip/blob/v2.0.0/index.js#L11

which triggers the following error when run on earlier versions of Node:

```
> chromedriver@80.0.2 install /home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver
> node install.js

internal/util.js:214
    throw new errors.TypeError('ERR_INVALID_ARG_TYPE', 'original', 'function');
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "original" argument must be of type function
    at promisify (internal/util.js:214:11)
    at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/extract-zip/index.js:11:18)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/travis/build/mozilla/webextension-polyfill/node_modules/chromedriver/install.js:14:20)
```

This commit fixes the issue by running tests with Node 10.
Node 8 had become end-of-life on 2019-12-31 anyway.
2020-09-17 13:19:35 +02:00
Rob Wu 2a4c9a8c79
chore: Remove IRC notification from Travis (#220)
We moved from IRC to Matrix.

... but the project is stable with little new development so we can as
well remove the notifications.
2020-02-19 23:49:46 +01:00
Luca Greco 06ebcbd07f
fix(travis): Added xvfb service to travis config (#203) 2019-09-24 21:20:42 +02:00
ExE Boss 83ec9e70ad test(integration): Use node for running test scripts (#167)
* test(integration): Use node for running browser smoketests
* test(integration): Use node for running test scripts
2019-01-28 18:49:25 +01:00
Stuart Colville 890a99ae62 chore: Updated npm token in the travis config file (#149) 2018-07-16 13:59:40 +02:00
ExE Boss 3a6d76a88f chore: Cleaned up travis config (#129)
* Removed duplicate `sudo` entry in `.travis.yml`
* Rephrased log message while running cross-browsers integration tests.
2018-06-19 23:29:35 +02:00
Luca Greco 5d186bae84 test(browsers-smoketests): Run a set of smoke tests on both Chrome and Firefox
This commit introduces tape as the test framework used to define the tests in the
test extension contexts and send them to the nodejs script that orchestrate the
test run.

The nodejs script has also been migrated from mocha to tape, it uses the custom test
helpers provided to setup the test environment (e.g. create a temporary dir
for the test extension, copy the last polyfill build, bundle tape to be used
in the test extension, start the browser which run the test extension
and finally collect the results of the test extension) and then it merges all the
tap logs collected from every test extension into a single "per browser" test suite.

- updated travis nodejs environment to nodejs 8
- uses tape to collect test results from inside the test extension
- added test case to check polyfill 'existing browser API object' detection
- added test for expected rejection on tabs.sendMessage with an invalid tabId
- added test with multiple listeners which resolves to undefined and null
- optionally run chrome smoketests with --enable-features=NativeCrxBindings
2018-06-02 20:59:46 +02:00
Luca Greco dd180a0907 chore(test): Fixed module bundlers tests on webpack 4 2018-04-09 15:13:35 +02:00
Luca Greco 94efb908b8
fix: Pass --no-sandbox chrome CLI option when running the integration tests on travis (#85) 2018-01-09 17:49:56 +01:00
Luca Greco 49ce6ef155 test: Run a minimal set of tests from a test extension running on Chrome (#66)
* test: Run a minimal set of integration/smoke tests on Chrome
* chore: minor tweaks to dependencies version in the package.json
2017-10-23 19:42:01 +02:00
Luca Greco c5fd6fdf41 chore: Publish tagged releases to npm from travis job 2017-04-13 14:48:04 +02:00
Luca Greco a34f9c71f8 test: run tests for the webpack and browserify bundled files on travis 2017-04-13 14:30:52 +02:00
Luca Greco 96cfb9c5c2 test: re-run the test suite on the minified file on travis 2017-04-11 14:24:23 +02:00
Luca Greco 27b71c2e2a fix: reduced travis irc message verbosity. 2016-11-14 22:34:17 +01:00
Luca Greco 573c438c23 fix: change notified irc channel 2016-11-07 16:34:34 +01:00
Luca Greco c08b8af982 test: introduced a test suite for unit testing. 2016-11-07 16:33:42 +01:00