伊斯坦布尔没有运行所有茉莉花规格

Istanbul not running all jasmine specs?

本文关键字:茉莉花 运行 伊斯坦布尔      更新时间:2023-09-26

我有24个测试

jasmine-node spec
........................
Finished in 2.061 seconds
24 tests, 54 assertions, 0 failures, 0 skipped

当我运行伊斯坦布尔时,它似乎只运行了14个测试

istanbul cover jasmine-node spec
..............
=====================================================
Writing coverage object [/Users/jared/git/redacted/redacted/coverage/coverage.json]
etc ..

为什么伊斯坦布尔没有运行我所有的测试?

配置

spec/support/jasmine.json

{
  "spec_dir": "spec",
  "spec_files": ["**/*_spec.js"],
  "helpers": ["helpers/**/*.js"]
}

.istanbul.yml

verbose: false
instrumentation:
  root: .
  extensions:
    - .js
  default-excludes: true
  excludes: [
    "bootstrap/js/bootstrap*.js",
    "bootstrap/js/jquery*.js",
    "bootstrap/js/lz-string-1.3.3-min.js",
    "bootstrap/js/moment-with-langs.min.js",
    "bootstrap/js/Sha256.js",
    "bootstrap/js/spin*.js",
    "bootstrap/js/underscore*.js",
    "env-0.10.20-prebuilt/**",
    "node_modules/**",
    "spec/**"
  ]
  embed-source: false
  variable: __coverage__
  compact: true
  preserve-comments: false
  complete-copy: false
  save-baseline: false
  baseline-file: ./coverage/coverage-baseline.json
  include-all-sources: true
  include-pid: false
reporting:
  print: summary
  reports:
    - lcov
  dir: ./coverage
  watermarks:
    statements: [50, 80]
    lines: [50, 80]
    functions: [50, 80]
    branches: [50, 80]
  report-config:
    clover: {file: clover.xml}
    cobertura: {file: cobertura-coverage.xml}
    json: {file: coverage-final.json}
    json-summary: {file: coverage-summary.json}
    lcovonly: {file: lcov.info}
    teamcity: {file: null, blockName: Code Coverage Summary}
    text: {file: null, maxCols: 0}
    text-lcov: {file: lcov.info}
    text-summary: {file: null}
hooks:
  hook-run-in-context: false
  post-require-hook: null
  handle-sigint: false
check:
  global:
    statements: 0
    lines: 0
    branches: 0
    functions: 0
    excludes: []
  each:
    statements: 0
    lines: 0
    branches: 0
    functions: 0
    excludes: []

规范目录:

tree spec
spec
├── api
│   └── utils_spec.js
├── emailer
│   ├── emailer_spec.js
│   ├── mail_redacted1_spec.js
│   └── mail_redacted2_spec.js
├── fixtures
│   └── emailer
│       ├── redacted1
│       │   ├── in.html
│       │   └── out.html
│       └── redacted2
│           ├── in.html
│           └── out.html
├── redacted3
│   └── index_spec.js
├── lzstring
│   └── lzstring_spec.js
├── repository
│   └── users_spec.js
├── support
│   ├── factories
│   │   └── users.js
│   └── jasmine.json
└── utils
    └── index_spec.js
12 directories, 14 files

通过更改

istanbul cover jasmine-node spec

istanbul cover node_modules/.bin/jasmine

我再也无法重现这个问题了。

当我写这个问题的时候,我没有意识到,但我可以用重现这个问题

jasmine-node spec

这意味着这个问题与伊斯坦布尔无关。