test(docs-infra): properly report errors if `page.init()` fails/rejects (#28290)
For asynchronous callbacks, this can be done either by calling `done.fail()` or by returning the promise directly (without requesting a `done` callback). (Using the latter, because it is shorter.) PR Close #28290
This commit is contained in:
parent
fdc2b0bf77
commit
76144f156c
|
@ -7,7 +7,7 @@ describe(browser.baseUrl, () => {
|
|||
const stripQuery = (url: string) => url.replace(/\?.*$/, '');
|
||||
const stripTrailingSlash = (url: string) => url.replace(/\/$/, '');
|
||||
|
||||
beforeAll(done => page.init().then(done));
|
||||
beforeAll(() => page.init());
|
||||
|
||||
beforeEach(() => browser.waitForAngularEnabled(false));
|
||||
afterEach(() => browser.waitForAngularEnabled(true));
|
||||
|
|
|
@ -4,7 +4,7 @@ import { SitePage } from './site.po';
|
|||
describe(browser.baseUrl, () => {
|
||||
const page = new SitePage();
|
||||
|
||||
beforeAll(done => page.init().then(done));
|
||||
beforeAll(() => page.init());
|
||||
|
||||
beforeEach(() => browser.waitForAngularEnabled(false));
|
||||
afterEach(() => browser.waitForAngularEnabled(true));
|
||||
|
|
Loading…
Reference in New Issue