This example runs Puppeteer programmatically.
In order to invoke and test against source (/src
) files, this example also uses sirv-cli
to run a local file server. Puppeteer connects to this file server to access the window
globals that src/math.js
and src/utils.js
are globally mounted to.
Note: Window globals are not required in order for
uvu
to work withpuppeteer
!
You may, for example, load your Preact, Svelte, Vue, ... etc application inside the devserver & interact with it through Puppeteer APIs!
$ npm install
# start server
$ npm start
# run tests (2nd terminal)
$ npm test
MIT