Skip to content

Commit 158c099

Browse files
committed
Code review
1 parent 5818bad commit 158c099

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

test/matchers/browser/toHaveClipboardText.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ const afterAssertion = vi.fn()
1111
test('toHaveClipboardText', async () => {
1212
browser.execute = vi.fn().mockResolvedValue('some clipboard text')
1313

14-
const result = await toHaveClipboardText(browser, 'some ClipBoard text', { ignoreCase: true, beforeAssertion, afterAssertion, wait: 1 })
14+
const result = await toHaveClipboardText(browser, 'some ClipBoard text', { ignoreCase: true, beforeAssertion, afterAssertion })
1515
expect(result.pass).toBe(true)
1616
expect(beforeAssertion).toBeCalledWith({
1717
matcherName: 'toHaveClipboardText',
1818
expectedValue: 'some ClipBoard text',
19-
options: { ignoreCase: true, beforeAssertion, afterAssertion, wait: 1 }
19+
options: { ignoreCase: true, beforeAssertion, afterAssertion }
2020
})
2121
expect(afterAssertion).toBeCalledWith({
2222
matcherName: 'toHaveClipboardText',
2323
expectedValue: 'some ClipBoard text',
24-
options: { ignoreCase: true, beforeAssertion, afterAssertion, wait: 1 },
24+
options: { ignoreCase: true, beforeAssertion, afterAssertion },
2525
result
2626
})
2727
})

test/matchers/element/toHaveText.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,8 @@ Received: undefined`)
505505
{ actual: 5, selectorName: '5' },
506506
{ actual: 'test', selectorName: 'test' },
507507
{ actual: Promise.resolve(true), selectorName: 'true' },
508-
{ actual: {}, selectorName: '[object Object]' },
509-
{ actual: ['1', '2'], selectorName: '1,2' },
508+
{ actual: {}, selectorName: '{}' },
509+
{ actual: ['1', '2'], selectorName: '["1","2"]' },
510510
])('should have pass false with proper error message when actual is unsupported type of $actual', async ({ actual, selectorName }) => {
511511
const result = await thisContext.toHaveText(actual as any, 'webdriverio')
512512

vitest.config.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ export default defineConfig({
2828
'types-checks-filter-out-node_modules.js',
2929
],
3030
thresholds: {
31-
lines: 88.3,
32-
functions: 85.9,
33-
statements: 88.2,
34-
branches: 79.6,
31+
lines: 88.7,
32+
functions: 87.2,
33+
statements: 88.8,
34+
branches: 84.4,
35+
// lines: 100,
36+
// functions: 100,
37+
// statements: 100,
38+
// branches: 100,
3539
}
3640
}
3741
}

0 commit comments

Comments
 (0)