Skip to content

Commit

Permalink
fix(windows): skip safari tests on windows
Browse files Browse the repository at this point in the history
playwright's safari on windows does not include webassembly support!
  • Loading branch information
chrisdickinson committed Nov 15, 2024
1 parent a1deb53 commit 6d327bd
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,29 @@ _test filter='.*':
trap cleanup EXIT
trap cleanup ERR

case "$(uname -s)" in
[dD]arwin)
os=macos
;;
[lL]inux*)
os=linux
;;
*)
os=windows
;;
esac
if [ "$os" = "windows" ]; then
browsers=chromium,firefox
else
browsers=all
fi

sleep 0.1
if [[ "deno" =~ {{ filter }} ]]; then deno test -A src/mod.test.ts; fi
if [[ "node-cjs" =~ {{ filter }} ]]; then node --no-warnings --test --experimental-global-webcrypto dist/tests/cjs/*.test.js; fi
if [[ "node-esm" =~ {{ filter }} ]]; then node --no-warnings --test --experimental-global-webcrypto dist/tests/esm/*.test.js; fi
if [[ "bun" =~ {{ filter }} ]]; then if &>/dev/null which bun; then bun run dist/tests/bun/*.test.js; fi; fi
if [[ "browsers" =~ {{ filter }} ]]; then playwright test --browser all tests/playwright.test.js --trace retain-on-failure; fi
if [[ "browsers" =~ {{ filter }} ]]; then playwright test --browser $browsers tests/playwright.test.js --trace retain-on-failure; fi

test: build && _test test-artifacts

Expand Down

0 comments on commit 6d327bd

Please sign in to comment.