jest-environment-artillery
v0.0.2
Published
A jest environment for running load tests on your application
Downloads
14
Maintainers
Readme
Jest-Environment-Artillery
A jest environment for running load tests on your application.
Installation
- Make sure jest is set up properly
- run
npm install --save-dev artillery jest-environment-artillery
- Configure
jest-environment-artillery
as test environment
Usage
describe("MyService", () => {
describe("Performance", () => {
it("has a limit for latency", async () => {
const testResult = await artillery({ target: "https://artillery.io" });
expect(testResult).toHaveMaxLatencyLowerThan(1000);
expect(testResult).toHaveMedianLatencyLowerThan(200);
});
});
});