i got an error below , how can i fix it ?
FAIL __tests__/router/workEvent-test.js
● Test suite failed to run
/opt/atlassian/pipelines/agent/build/__tests__/router/workEvent-test.js:10
const body = { ...workEvent, date_str, timezone };
^^^
SyntaxError: Unexpected token ...
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:316:17 )
below is my test config file
bitbucket-pipelines.yml
# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: node:8.0.0
pipelines:
default:
- step:
caches:
- node
services: # set up services in definitions
- mysql
- redis
script: # Modify the commands below to build your repository.
- npm install
- npm test
- npm install -g gulp
- gulp setup
- gulp recreate-db
- gulp dump-dev_data
- npm start
# set up db docker
definitions:
services:
mysql:
image: mysql
environment:
MYSQL_DATABASE: '******'
MYSQL_ROOT_PASSWORD: '******'
redis:
image: redis
do you also have this error when you run your build locally?
Otherwise, make sure that the node version you are running locally matches the node version you have configured in Pipelines (node:8.0.0)
npm test run ok , locally .
in my bitbucket-pipelines.yml i use
image: node:8.0.0
should any thing else i need to do in bitbucket-pipelines.yml for configured node:8.0.0 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.