Skip to content

Commit

Permalink
e2e test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbme committed Jul 28, 2024
1 parent 265eb2d commit 68a5812
Show file tree
Hide file tree
Showing 9 changed files with 1,027 additions and 20 deletions.
4 changes: 2 additions & 2 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import esbuild from 'esbuild';
const isProduction = process.env.NODE_ENV === 'production';

await esbuild.build({
entryPoints: ['./src/browser-scraper.ts'],
outfile: './dist/browser-scraper.js',
entryPoints: ['./src/index.ts'],
outfile: './dist/index.js',

target: ['es2019'],
bundle: true,
Expand Down
16 changes: 12 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
alias c := check
alias b := build

e2e_test_args := "--experimental-test-snapshots --import tsx --test 'src/**/*.e2e.ts' --test-reporter spec"

scrape *PARAMS:
cargo run --bin mb-scraper {{PARAMS}}

Expand All @@ -15,10 +17,16 @@ check-types:
lint:
npm run lint

test:
npm run test

check: check-formatting check-types lint test
check: check-formatting check-types lint

build:
npm run build

e2e: build
CHROMIUM_PATH=$(which chromium) node {{e2e_test_args}}

e2eh:
DEBUG=true just e2e

e2e-update-snapshots:
CHROMIUM_PATH=$(which chromium) node --test-update-snapshots {{e2e_test_args}}
Loading

0 comments on commit 68a5812

Please sign in to comment.