build: update jasmine to 3.5 (#34625)
1. update jasmine to 3.5 2. update @types/jasmine to 3.5 3. update @types/jasminewd2 to 2.0.8 Also fix several cases, the new jasmine 3 will help to create test cases correctly, such as in the `jasmine 2.x` version, the following case will pass ``` expect(1 == 2); ``` But in jsamine 3, the case will need to be ``` expect(1 == 2).toBeTrue(); ``` PR Close #34625
This commit is contained in:

committed by
Kara Erickson

parent
52ab9397a0
commit
b28a5f6eef
@ -876,7 +876,7 @@ import {SwTestHarness, SwTestHarnessBuilder} from '../testing/scope';
|
||||
async() => {
|
||||
expect(await makeRequest(scope, '/foo.txt')).toEqual('this is foo');
|
||||
await driver.initialized;
|
||||
spyOn(server, 'fetch').and.callFake((req: Request) => new MockResponse(null, {
|
||||
spyOn(server, 'fetch').and.callFake(async(req: Request) => new MockResponse(null, {
|
||||
status: 503,
|
||||
statusText: 'Service Unavailable'
|
||||
}));
|
||||
@ -1432,7 +1432,8 @@ import {SwTestHarness, SwTestHarnessBuilder} from '../testing/scope';
|
||||
|
||||
it('ignores passive mixed content requests ', async() => {
|
||||
const scopeFetchSpy = spyOn(scope, 'fetch').and.callThrough();
|
||||
const getRequestUrls = () => scopeFetchSpy.calls.allArgs().map(args => args[0].url);
|
||||
const getRequestUrls = () =>
|
||||
(scopeFetchSpy.calls.allArgs() as[Request][]).map(args => args[0].url);
|
||||
|
||||
const httpScopeUrl = 'http://mock.origin.dev';
|
||||
const httpsScopeUrl = 'https://mock.origin.dev';
|
||||
|
Reference in New Issue
Block a user