Thanks for the complete script.

The article uses the deprecated npm package of Angular CLI, see the updated .travis.ymlbelow. The new package requires higher node version. Additionally, if haveyarn.lock file in your repository, you can install packages with yarn (= faster build). Using ng test was suggested in another comment.

sudo: required
dist: trusty
language: node_js
node_js:
- '7.0.0'
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
before_script:
- npm install -g @angular/cli
- yarn install
- ng build
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade