Angular build errored - Karma test time out

I have an Angular tutorial project in GitHub and configured Travis CI for it. But the build errored - Karma testing timed out. Error message is given below:

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

Check the details on how to adjust your build configuration on: Common Build Problems - Travis CI

The build has been terminated

Below given is the .travis.yml file:

sudo: required
addons:
  chrome: stable

language: node_js
node_js:
  - "8"

branches:
  only:
    - master

before_script:
  - npm install -g @angular/cli

script:
  - ng build --prod --aot
  - ng test

Should I ask Travis to wait further (I heard default is 10 minutes) or am I making any mistake? Should I make changes to the .yml file for Karma testing? I’m very very new to Travis CI, any help is appreciated.

Regards.