-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jasmine-runner): update deprecated api calls (#2250)
Removes some calls to deprecated Jasmine APIs. | Old | New | |--|--| | `throwOnExpectationFailure` | `jasmine.Env.configure( { oneFailurePerSpec: true } )` | | `stopOnSpecFailure` | `jasmine.Env.configure( { failFast: true } )` | | `jasmine.addReporter` | `jasmine.env.addReporter` | | `jasmine.clearReporters` | `jasmine.env.clearReporters` |
- Loading branch information
Showing
12 changed files
with
1,010 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"spec": [ | ||
"test/unit/**/*.js", | ||
"test/integration/**/*.js" | ||
], | ||
"file": "test/helpers/setupTests.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import sinon = require('sinon'); | ||
|
||
export function createRunDetails(): jasmine.RunDetails { | ||
return { | ||
failedExpectations: [], | ||
order: { | ||
random: false, | ||
seed: '12foo', | ||
sort: (_) => _, | ||
} as jasmine.Order, | ||
}; | ||
} | ||
|
||
export function createEnvStub(): sinon.SinonStubbedInstance<jasmine.Env> { | ||
return { | ||
currentSpec: sinon.stub(), | ||
matchersClass: sinon.stub(), | ||
version: sinon.stub(), | ||
versionString: sinon.stub(), | ||
nextSpecId: sinon.stub(), | ||
addReporter: sinon.stub(), | ||
execute: sinon.stub(), | ||
describe: sinon.stub(), | ||
beforeEach: sinon.stub(), | ||
beforeAll: sinon.stub(), | ||
currentRunner: sinon.stub(), | ||
afterEach: sinon.stub(), | ||
afterAll: sinon.stub(), | ||
xdescribe: sinon.stub(), | ||
it: sinon.stub(), | ||
xit: sinon.stub(), | ||
compareRegExps_: sinon.stub(), | ||
compareObjects_: sinon.stub(), | ||
equals_: sinon.stub(), | ||
contains_: sinon.stub(), | ||
addCustomEqualityTester: sinon.stub(), | ||
addMatchers: sinon.stub(), | ||
specFilter: sinon.stub(), | ||
throwOnExpectationFailure: sinon.stub(), | ||
stopOnSpecFailure: sinon.stub(), | ||
seed: sinon.stub(), | ||
provideFallbackReporter: sinon.stub(), | ||
throwingExpectationFailures: sinon.stub(), | ||
allowRespy: sinon.stub(), | ||
randomTests: sinon.stub(), | ||
randomizeTests: sinon.stub(), | ||
clearReporters: sinon.stub(), | ||
configure: sinon.stub(), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import 'source-map-support/register'; | ||
import * as chai from 'chai'; | ||
import * as chaiAsPromised from 'chai-as-promised'; | ||
import * as sinonChai from 'sinon-chai'; | ||
import { testInjector } from '@stryker-mutator/test-helpers'; | ||
import * as sinon from 'sinon'; | ||
|
||
chai.use(sinonChai); | ||
chai.use(chaiAsPromised); | ||
|
||
afterEach(() => { | ||
sinon.reset(); | ||
testInjector.reset(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.