我是CircleCI的初学者。我想将我的项目与CircleCI集成在一起。每当运行npm test时,测试都会失败,并在CircleCI中出现以下错误。
any
我正在使用Mocha和Chai测试框架。我使用以下命令运行测试:
Error: Timeout of 15000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/circleci/repo/test/api/client/login-test.js)
这是我的CircleCi "script":{
"test": "mocha test/**/**/*.js --timeout 15000 --exit"
}
文件
config.yml
我错过了配置中的任何内容吗?
这是我的单元测试
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:10.15.3
working_directory: ~/repo
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-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
# run tests!
- run: npm test