diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /remote/test/puppeteer/scripts/test-install.sh | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | remote/test/puppeteer/scripts/test-install.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/remote/test/puppeteer/scripts/test-install.sh b/remote/test/puppeteer/scripts/test-install.sh new file mode 100755 index 0000000000..e59aa39d00 --- /dev/null +++ b/remote/test/puppeteer/scripts/test-install.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env sh +set -e + +ROOTDIR="$(pwd)" +# Pack the module into a tarball +npm pack +tarball="$(realpath puppeteer-*.tgz)" +TMPDIR="$(mktemp -d)" +cd $TMPDIR +# Check we can install from the tarball. +# This emulates installing from npm and ensures that: +# 1. we publish the right files in the `files` list from package.json +# 2. The install script works and correctly exits without errors +# 3. Requiring Puppeteer from Node works. +npm install --loglevel silent "${tarball}" +node --eval="require('puppeteer')" +ls $TMPDIR/node_modules/puppeteer/.local-chromium/ + +# Again for Firefox +TMPDIR="$(mktemp -d)" +cd $TMPDIR +PUPPETEER_PRODUCT=firefox npm install --loglevel silent "${tarball}" +node --eval="require('puppeteer')" +rm "${tarball}" +ls $TMPDIR/node_modules/puppeteer/.local-firefox/linux-*/firefox/firefox + +# Again for puppeteer-core +cd $ROOTDIR +node ./utils/prepare_puppeteer_core.js +npm pack +tarball="$(realpath puppeteer-core-*.tgz)" +TMPDIR="$(mktemp -d)" +cd $TMPDIR +# Check we can install from the tarball. +# This emulates installing from npm and ensures that: +# 1. we publish the right files in the `files` list from package.json +# 2. The install script works and correctly exits without errors +# 3. Requiring Puppeteer Core from Node works. +npm install --loglevel silent "${tarball}" +node --eval="require('puppeteer-core')" + |