Run linter

This commit is contained in:
Quine Global 2025-09-07 16:33:23 -07:00 committed by Philip Peterson
parent b1e120cc49
commit a9ca2d9338
2 changed files with 35 additions and 35 deletions

View file

@ -34,51 +34,51 @@ export function testFailed() {
export function testFailedWithMultipleErrors() {
const errors =
[
{
message: 'ReferenceError: All is Dust',
stack: 'ReferenceError: All is Dust'
},
{
message: 'InternalError: Abandon Hope',
stack: 'InternalError: Abandon Hope'
}
]
[
{
message: 'ReferenceError: All is Dust',
stack: 'ReferenceError: All is Dust'
},
{
message: 'InternalError: Abandon Hope',
stack: 'InternalError: Abandon Hope'
}
]
return Object.assign(testState(), { errors, state: 'failed', end: '2018-05-14T15:17:21.631Z', _duration: 2730 })
}
export function testFailedWithMultipleErrorsAndStacksNotContainingMessages() {
const errors =
[
{
message: 'ReferenceError: All is Dust',
stack: 'stack trace of ReferenceError'
},
{
message: 'InternalError: Abandon Hope',
stack: 'stack trace of InternalError'
}
]
[
{
message: 'ReferenceError: All is Dust',
stack: 'stack trace of ReferenceError'
},
{
message: 'InternalError: Abandon Hope',
stack: 'stack trace of InternalError'
}
]
return Object.assign(testState(), { errors, state: 'failed', end: '2018-05-14T15:17:21.631Z', _duration: 2730 })
}
export function testFailedWithAssertionErrorFromExpectWebdriverIO() {
const errors =
[
{
message: 'Expect $(`login-app`).$(`<fn>`).$(`<fn>`).$(`<fn>`) to be displayed\n' +
[
{
message: 'Expect $(`login-app`).$(`<fn>`).$(`<fn>`).$(`<fn>`) to be displayed\n' +
'Expected: \u001b[32m"displayed"\u001b[39m\n' +
'Received: \u001b[31m"\u001b[7mnot \u001b[27mdisplayed"\u001b[39m',
stack: 'Error: Expect $(`content-production-app`).$(`<fn>`).$(`<fn>`).$(`<fn>`) to be displayed\n' +
stack: 'Error: Expect $(`content-production-app`).$(`<fn>`).$(`<fn>`).$(`<fn>`) to be displayed\n' +
'\n' +
'Expected: \u001b[32m"displayed"\u001b[39m\n' +
'Received: \u001b[31m"\u001b[7mnot \u001b[27mdisplayed"\u001b[39m\n' +
' at World.<anonymous> (then.js:271:21)\n' +
' at World.executeSync (node_modules/@wdio/sync/build/index.js:56:18)\n' +
' at node_modules/@wdio/sync/build/index.js:82:70',
name: 'Error',
}
]
name: 'Error',
}
]
const error =
{
message: 'Expect $(`login-app`).$(`<fn>`).$(`<fn>`).$(`<fn>`) to be displayed\n' +
@ -135,11 +135,11 @@ export function hookPassed(): WDIOReporter.Hook {
export function hookFailed(): WDIOReporter.Hook {
const error =
{
message: 'element ("body") still existing after 100ms',
stack: 'Error: element ("body") still existing after 100ms',
type: 'Error',
}
{
message: 'element ("body") still existing after 100ms',
stack: 'Error: element ("body") still existing after 100ms',
type: 'Error',
}
return Object.assign(allHookState(), { error, errors: [error], state: 'failed', end: '2018-05-14T15:17:21.631Z', _duration: 2730 })
}

View file

@ -68,10 +68,10 @@ describe('saveScreenshot', () => {
const expectedError =
// no file
await expect(
await expect(
// @ts-ignore test invalid parameter
browser.saveScreenshot()
).rejects.toEqual(new Error('saveScreenshot expects a filepath of type string and ".png" file ending'))
browser.saveScreenshot()
).rejects.toEqual(new Error('saveScreenshot expects a filepath of type string and ".png" file ending'))
// wrong extension
await expect(