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.
This commit is contained in:
Rob Wu 2020-09-17 09:42:11 +02:00
parent faa22a4df1
commit 3f4f0b9ef5
1 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,8 @@ language: node_js
node_js: node_js:
## Some of the ES6 syntax used in the browser-polyfill sources is only supported on nodejs >= 6 ## Some of the ES6 syntax used in the browser-polyfill sources is only supported on nodejs >= 6
## and the selenium-webdriver dependency used by the integration tests requires nodejs >= 8. ## and the selenium-webdriver dependency used by the integration tests requires nodejs >= 8.
- '8' ## and the chromedriver dependency requires Node >= 10.
- '10'
script: script:
- npm run build - npm run build