Skip to content

Integration test for Cloudflare Workers with Jest and Wrangler

License

Notifications You must be signed in to change notification settings

pmrotule/cloudflare-worker-jest-test

Repository files navigation

cloudflare-worker-jest-test

Starter template for Cloudflare Worker project using Typescript, Jest, Eslint, Prettier, Webpack, and of course, Wrangler cli.

This project has been generated using worker-typescript-template.

Getting started

  • Install the dependencies: yarn install
  • One of the dependency is the Cloudflare Worker cli called wrangler which is used to develop and publish the worker

Development

  • yarn dev will compile the ts files and open a preview of the worker in the browser (watch mode enabled)
  • Switch to the "Testing" tab to check the response status and headers

Test

yarn test

Publish

  • Add your accound and zone id in wrangler.toml
  • Login in Cloudflare using yarn login (short for yarn wrangler login)
  • Publish your changes:
yarn publish

About

Integration test for Cloudflare Workers with Jest and Wrangler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published