language: node_js
node_js:
  - "4"
  - "6"
  - "8"
  - "10"
  - "node"
env:
  - FORMDATA_VERSION=1.0.0
  - FORMDATA_VERSION=2.1.0
before_script:
  - 'if [ "$FORMDATA_VERSION" ]; then npm install form-data@^$FORMDATA_VERSION; fi'
script:
  - npm uninstall encoding
  - npm run coverage
  - npm install encoding
  - npm run coverage
cache:
  directories:
    - node_modules
