Unit testing for EdgeWorkers

Unit testing can help you find bugs. Finding and fixing bugs early in the development cycle will improve the quality of your code and make the testing phase easier. It can also reduce the risk of regression.

A unit test runs code over each segment of your program, checking the input and output. These tests allow developers to check individual areas of a program to see where and why errors are occurring.

Akamai provides unit testing frameworks for EdgeWorkers to help you with this process.

The repository provides a set of mocks for the testing frameworks below:

For detailed instructions on how to set up a suite of unit tests with Jest and Mocha, refer to the Getting started guide for EdgeWorkers Unit Testing framework.