karma-jasmine
Advanced tools
Comparing version 5.0.1 to 5.1.0
@@ -481,4 +481,5 @@ (function(window) { | ||
var originalSpecFilter = jasmineEnv.configuration().specFilter | ||
var specFilter = function (spec) { | ||
return karmaSpecFilter.matches(spec) | ||
return originalSpecFilter(spec) && karmaSpecFilter.matches(spec) | ||
} | ||
@@ -508,3 +509,2 @@ | ||
jasmineConfig.specFilter = createSpecFilter(clientConfig, jasmineEnv) | ||
jasmineEnv.configure(jasmineConfig) | ||
@@ -511,0 +511,0 @@ |
{ | ||
"name": "karma-jasmine", | ||
"version": "5.0.1", | ||
"version": "5.1.0", | ||
"description": "A Karma plugin - adapter for Jasmine testing framework.", | ||
@@ -82,2 +82,3 @@ "main": "lib/index.js", | ||
"Fernando Costa <fadc80@gmail.com>", | ||
"Nico Jansen <jansennico@gmail.com>", | ||
"Aaron Hartwig <aaron.hartwig@whyhigh.com>", | ||
@@ -99,3 +100,2 @@ "Alesei N <github.com@bzik.net>", | ||
"Milan Lempera <milanlempera@gmail.com>", | ||
"Nico Jansen <jansennico@gmail.com>", | ||
"Niels Dequeker <niels.dequeker@gmail.com>", | ||
@@ -102,0 +102,0 @@ "Robin Gloster <robin@loc-com.de>", |
@@ -84,4 +84,30 @@ # karma-jasmine | ||
## Custom spec filter | ||
Providing a [custom spec filter](https://jasmine.github.io/api/edge/Configuration#specFilter) is also supported. | ||
Example: | ||
```js | ||
// Users are able to set a custom specFilter themselves | ||
jasmine.getEnv().configure({ | ||
specFilter: function (spec) { | ||
return spec.getFullName() === 'spec that succeeds' | ||
} | ||
}) | ||
describe('spec', () => { | ||
it('that fails', () => { | ||
fail('This spec should not run!') | ||
}) | ||
it('that succeeds', () => { | ||
expect(1).toBe(1) | ||
}) | ||
}) | ||
``` | ||
--- | ||
For more information on Karma see the [homepage](https://karma-runner.github.io/). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26554
545
113