actionhero
Version:
actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks
22 lines (17 loc) • 514 B
text/typescript
import { Process, specHelper } from "./../../src/index";
const actionhero = new Process();
describe("Test: RunAction", () => {
beforeAll(async () => {
await actionhero.start();
});
afterAll(async () => {
await actionhero.stop();
});
test("can run the task manually", async () => {
const { randomNumber } = await specHelper.runTask("runAction", {
action: "randomNumber",
});
expect(randomNumber).toBeGreaterThanOrEqual(0);
expect(randomNumber).toBeLessThan(1);
});
});