0.0.2 • Published 7 years ago
jest-environment-artillery v0.0.2
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);
});
});
});