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

时间:2015-11-16 18:54:27

标签: javascript jasmine jasmine-node istanbul

我有24次测试。

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

当我运行istanbul时,似乎只运行了14次测试。

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

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

配置

规格/支持/ 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

1 个答案:

答案 0 :(得分:0)

通过更改

istanbul cover jasmine-node spec

istanbul cover node_modules/.bin/jasmine

我不再能够重现这个问题。

我在写这个问题的时候并没有意识到,但我能够用

重现这个问题
jasmine-node spec

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