Skip to main content

Testing Policies

Testing policies with jsPolicy is straightforward. Since your policy logic will be entirely written in JavaScript (or TypeScript which compiles to JavaScript), you can use any JavaScript testing framework to create and run test suits, including unit tests, functional tests, integration tests and end-to-end tests.

See the example tests in the jsPolicy SDK project on GitHub for a reference implementation using the test framework Jest developed by Facebook.