Skip to content

Commit

Permalink
ci: bump testcafe
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jan 2, 2024
1 parent 68ffc2f commit 702e1c7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ jobs:
node-version: lts/iron # 20
cache: 'npm'
- run: npm clean-install
- run: npm install --global testcafe@2
- run: npm install --global testcafe@3
- name: Add rows to the TCC.db
if: ${{ matrix.runs-on == 'macos-13' }}
run: |
Expand Down
7 changes: 3 additions & 4 deletions tap/.browser.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
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')
fixture('test suite').page('https://important-clam-66.deno.dev')

test('passes tests', async (user) => {
const scriptTag = Selector('script')

await user.typeText('#js', script, { paste: true }).click('[type=submit]')

await scriptTag()
Expand Down
6 changes: 2 additions & 4 deletions tap/.browsers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
--log-level=warning \
--format=esm \
--bundle \
--minify \
--target=esnext \
--outfile=tap/run-browser.js \
tap/run-browser.ts

HOSTNAME="localhost"
SSL=""

: "${BROWSER:=chrome:headless}"

testcafe "$BROWSER" --skip-js-errors --ssl "$SSL" --hostname "$HOSTNAME" tap/.browser.ts
testcafe "$BROWSER" --hostname localhost tap/.browser.ts
5 changes: 2 additions & 3 deletions tap/cookbook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import jweVectors from '../cookbook/jwe.mjs'

// https://bugs.webkit.org/show_bug.cgi?id=262499
// /~https://github.com/web-platform-tests/wpt/pull/42292
if (env.isWebKit) {
if (env.isWebKitAbove17) {
// @ts-ignore
const ed25519 = jwsVectors.find((vector) => vector.title.includes('Ed25519'))
ed25519.reproducible = false
Expand Down Expand Up @@ -42,7 +42,7 @@ export default (QUnit: QUnit, lib: typeof jose) => {
return !env.isDeno
}
if (vector.input.alg === 'EdDSA') {
return (env.isWebKit && env.isWebKitAbove17) || !env.isBrowser
return env.isWebKitAbove17 || !env.isBrowser
}
return true
}
Expand Down Expand Up @@ -258,7 +258,6 @@ export default (QUnit: QUnit, lib: typeof jose) => {
await lib.importJWK(
toJWK(vector.input.pwd || vector.input.key),
dir ? vector.input.enc : vector.input.alg,
true,
)
)
let publicKey
Expand Down

0 comments on commit 702e1c7

Please sign in to comment.