Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
heeckhau committed Feb 23, 2024
1 parent 876fef5 commit e3237a8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,8 @@ jobs:
${{ runner.os }}-pnpm-store-
- uses: browser-actions/setup-chrome@v1
id: setup-chrome
- run: |
${{ steps.setup-chrome.outputs.chrome-path }} --version
id: setup-chrome-path
- run: echo "CHROME_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"

- name: Install wasm-pack
run: npm install -g wasm-pack
Expand Down
11 changes: 9 additions & 2 deletions test/testRunner.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import puppeteer from 'puppeteer';
import puppeteer, { PuppeteerLaunchOptions } from 'puppeteer';
import { describe, it, before, after } from 'mocha';
const assert = require('assert');
const { exec } = require('node:child_process');

// puppeteer options
const opts = {
let opts: PuppeteerLaunchOptions = {
headless: !!process.env.HEADLESS,
slowMo: 100,
timeout: 60000,
};

if (process.env.CHROME_PATH) {
opts = {
...opts,
executablePath: process.env.CHROME_PATH
}
};

let browser: any, page: any, server: any;

// expose variables
Expand Down

0 comments on commit e3237a8

Please sign in to comment.