These browsers have bugs that occasionally cause typed array comparisons to pass when they should fail, or vice versa: * for...in loops sometimes omit keys, such that two typed arrays with different lengths appear to have the same set of keys. * Typed arrays sometimes have mulitple undefined keys (which is to say that the key itself is undefined). Two typed arrays with identical length and contents can compare unequal because of the spurious undefined keys.) Those problems could be avoided by comparing keys 0...length-1 rather than the actual set of exposed keys, but that would be a pretty nasty breaking change for anyone whose code tacks extra properties onto typed arrays. So far these bugs haven't been seen in anything newer than FF 128. Since the affected browsers are all past end of life, the most sensible thing is to just stop testing against them.
44 lines
944 B
Bash
Executable File
44 lines
944 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Run tests in supported browsers that are available on Saucelabs.
|
|
# Note: Safari is tested via GitHub Actions because Saucelabs only makes Safari
|
|
# 18 and later available to paid enterprise accounts. See
|
|
# .github/workflows/safari.yml.
|
|
|
|
run_browser() {
|
|
browser=$1
|
|
version=$2
|
|
os="$3"
|
|
description="$browser $version"
|
|
if [ $version = "latest" ]; then
|
|
version=""
|
|
fi
|
|
|
|
echo
|
|
echo
|
|
echo "Running $description"
|
|
echo
|
|
USE_SAUCE=true JASMINE_BROWSER=$browser SAUCE_BROWSER_VERSION=$version SAUCE_OS="$os" npm run ci
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "PASS: $description" >> "$passfile"
|
|
else
|
|
echo "FAIL: $description" >> "$failfile"
|
|
fi
|
|
}
|
|
|
|
passfile=`mktemp -t jasmine-results.XXXXXX` || exit 1
|
|
failfile=`mktemp -t jasmine-results.XXXXXX` || exit 1
|
|
|
|
run_browser chrome latest
|
|
run_browser firefox latest
|
|
run_browser firefox 140
|
|
run_browser MicrosoftEdge latest
|
|
|
|
echo
|
|
cat "$passfile" "$failfile"
|
|
|
|
if [ -s "$failfile" ]; then
|
|
exit 1
|
|
fi
|