trigger:
- '*'
pr:
- '*'

strategy:
  matrix:
    linux:
      imageName: 'ubuntu-16.04'
    mac:
      imageName: 'macos-10.13'
    windows:
      imageName: 'vs2017-win2016'

pool:
  vmImage: $(imageName)

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '8.x'
  displayName: 'Install Node.js'  
- bash: |
    /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
    echo ">>> Started xvfb"
  displayName: Start xvfb
  condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- task: Npm@1
  displayName: 'Install dependencies'
  inputs:
    verbose: false
- task: Npm@1
  displayName: 'Lint'
  inputs:
    command: custom
    verbose: false
    customCommand: run lint
- task: Npm@1
  displayName: 'Compile sources'
  inputs:
    command: custom
    verbose: false
    customCommand: 'run compile'
- bash: npm run test
  displayName: 'Run tests'
  env:
    DISPLAY: ':99.0'

trigger:
- '*'
pr:
- '*'

strategy:
  matrix:
    linux:
      imageName: 'ubuntu-16.04'
    mac:
      imageName: 'macos-10.14'
    windows:
      imageName: 'vs2017-win2016'

pool:
  vmImage: $(imageName)

steps:
- task: NodeTool@0
  inputs:
    versionSpec: '8.x'
  displayName: 'Install Node.js'  
- bash: |
    /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
    echo ">>> Started xvfb"
  displayName: Start xvfb
  condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- task: Npm@1
  displayName: 'Install dependencies'
  inputs:
    verbose: false
- task: Npm@1
  displayName: 'Lint'
  inputs:
    command: custom
    verbose: false
    customCommand: run lint
- task: Npm@1
  displayName: 'Compile sources'
  inputs:
    command: custom
    verbose: false
    customCommand: 'run compile'
- bash: npm run test
  displayName: 'Run tests'
  env:
    DISPLAY: ':99.0'

Use macos-10.14 instead of macos-10.13
Use macos-10.14 instead of macos-10.13