I keep getting this error:
> coinplan@0.0.0 test /home/circleci/coinplan
> mocha "src/server/test/**/*.js" --exit
/home/circleci/coinplan/src/server/test/api/login.js:19
mocha.beforeEach(async () => {
^
SyntaxError: Unexpected token (
This is my config.yml file
version: 2
jobs:
build:
machine:
node:
version: 8.2.0
enviroment:
COINPLAN_DB_HOST: localhost
COINPLAN_DB_PORT: 5432
COINPLAN_TOKEN_SECRET: circle
COINPLAN_SERVER_PORT: 3000
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
postgres:
version: 9.6
environment:
COINPLAN_DB_TEST_DATABASE: circle_ci_test
COINPLAN_DB_PASSWORD: test
COINPLAN_DB_USER: test
working_directory: ~/coinplan
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
# run tests!
- run: npm run test
- run: npm run lint