sudo: false

language: node_js
matrix:
  include:
    - node_js: '11'
    - node_js: '10'
    - node_js: '8'
    - node_js: '6'
install:
  - npm install -g npm@latest
  - npm ci
  # https://github.com/microsoft/TypeScript/issues/40166
  - |
    if [ "$TRAVIS_NODE_VERSION" = '6' ]; then npm install typescript@3.9.7 ; fi
script:
  - npm test
cache:
  directories:
    - ~/.npm
    - node_modules
after_success:
  - './node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls'
