在分叉scully
之后,从根文件夹运行npm test
会启动jest
测试,但不会在./schematics/scully下使用茉莉花启动单元测试。
在./schematics/scully下运行npm test
时,它不起作用:
git clone git@github.com:atao60/scully.git
cd scully/schematics/scully
npm i
npm i -D guess-parser@^0.4.13 @angular/core@"^8.0.0 || ^9.0.0-0" @angular/common@"^8.0.0 || ^9.0.0-0"
npm i -D bufferutil@^4.0.1 utf-8-validate@^5.0.2 zone.js@~0.10.3 typescript@"~3.7.5 || ~3.8.0"
npm test
#
# > @scullyio/init@0.0.26 test /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully
# > npm run build && jasmine src/**/*_spec.js
#
#
# > @scullyio/init@0.0.26 build /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully
# > tsc -p tsconfig.json
#
# Randomized with seed 75077
# Started
# FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
#
# Failures:
# 1) add-post when using `metaDataFile` option should add the meta data but keep title from options
# Message:
# Error: Cannot find module '@schematics/angular/package.json'
# Require stack:
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/@angular-devkit/schematics/tools/node-module-engine-host.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/@angular-devkit/schematics/tools/workflow/node-workflow.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/@angular-devkit/schematics/tools/index.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/@angular-devkit/schematics/testing/schematic-test-runner.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/@angular-devkit/schematics/testing/index.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/src/add-blog/index_spec.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/jasmine/lib/jasmine.js
# - /home/pierre/DevSpace/gh-pages-explo/scully/schematics/scully/node_modules/jasmine/bin/jasmine.js
# Stack:
# error properties: Object({ code: 'MODULE_NOT_FOUND', requireStack: [ '/home/pierre/DevSpace/
# [...]
#
# 33 specs, 33 failures
# Finished in 0.465 seconds
# Randomized with seed 75077 (jasmine --random=true --seed=75077)
# npm ERR! Test failed. See above for more details.
似乎我错过了一些明显的事情,但我不知道是什么。任何线索都将受到欢迎。