# http://www.appveyor.com/docs/appveyor-yml

# Be aware of https://github.com/nodejs/LTS when choosing versions to test
# Update engines.node in package.json if removing old versions.
environment:
  matrix:
    - nodejs_version: "4"
      # Empty version installs most recent version available
    - nodejs_version: ""

# If the package has arch-dependent features, uncomment this.
#platform:
#  - x86
#  - x64

install:
  - ps: Install-Product node $env:nodejs_version
  - npm -g install npm
  - npm install

test_script:
  - node --version
  - npm --version
  - npm test

# Disable build step, which we don't need
build: off

# If any job fails, fail build immediately to avoid wasting time/resources.
matrix:
  fast_finish: true

# http://www.appveyor.com/docs/appveyor-yml

# Be aware of https://github.com/nodejs/LTS when choosing versions to test
# Update engines.node in package.json if removing old versions.
environment:
  matrix:
    - nodejs_version: "4"
      # npm 6.0.0 fails on Node 4
      # Note: Can't use carat version https://github.com/npm/npm/issues/17297
      npm_version: ">=5 <6"
      # Empty version installs most recent version available
    - nodejs_version: ""
      npm_version: "latest"

# If the package has arch-dependent features, uncomment this.
#platform:
#  - x86
#  - x64

install:
  - ps: Install-Product node $env:nodejs_version
  - npm -g install "npm@%npm_version%"
  - npm install

test_script:
  - node --version
  - npm --version
  - npm test

# Disable build step, which we don't need
build: off

# If any job fails, fail build immediately to avoid wasting time/resources.
matrix:
  fast_finish: true

Use npm 5 when testing with Node 4
Use npm 5 when testing with Node 4

npm 6 dropped support for Node 4 and fails with the following error:

    SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

So use npm 5 when testing with Node 4.

Signed-off-by: Kevin Locke <ffb4761cba839470133bee36aeb139f58d7dbaa9@kevinlocke.name>
