deno.land / x / oauth4webapi@v1.2.2 / tap / .browser.ts

.browser.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { t, Selector } from 'testcafe'
fixture('test suite').page('https://important-clam-66.deno.dev')
import * as fs from 'node:fs'
const script = fs.readFileSync('./tap/run-browser.js', { encoding: 'utf-8' })
const scriptTag = Selector('script')
test('passes tests', async (user) => { await user.typeText('#js', script, { paste: true }).click('[type=submit]')
await scriptTag()
let stats do { await new Promise((resolve) => setTimeout(resolve, 1000)) stats = await t.eval(() => globalThis.stats) } while (!stats)
const { log } = await t.getBrowserConsoleMessages() for (const entry of log) { console.log(entry) }
await t.expect(stats?.failed).eql(0)})
oauth4webapi

Version Info

Tagged at
2 years ago