This repo contains multiple test playgrounds:
- browser
- cjs
- esm
- nextjs
- vite-cjs
- vite-esm
- webpack-cjs
You should checkout this project beside your faker
folder, so the pnpm link in package.json is correctly resolved.
By default, the project uses the latest version of faker
, but you can switch to the local clone by:
- editing the
package.json
- replacing
"overrides-for-dev"
with"overrides"
- running
pnpm install
Make sure you have build the faker
project so there is a dist
folder.
Please run pnpm install
once before executing any of the following commands.
You can run:
pnpm -r --workspace-concurrency 1 test
to testcjs
andesm
pnpm -r --workspace-concurrency 1 test:js
to test only JavaScript files forcjs
andesm
pnpm -r --workspace-concurrency 1 test:ts
to test only TypeScript files forcjs
andesm
pnpm run test:cjs
to test onlycjs
pnpm run test:esm
to test onlyesm
pnpm run build
to build/bundle all playgrounds
To test the browser
playground you need to run pnpm -r serve
and then open the https://localhost:3000/
in your browser.