SaaSquatch Program Test Suite
This package contains everything needed to facilitate blackbox unit testing of the
SaaSquatch programs. It includes a family of default Cucumber step definitions and tools
for simulated execution of the programs.
Installation
npm install -D @saasquatch/program-test-suite
Usage
The program test suite is based on Jest. Place the following inside your Jest config:
import { jestConfig } from "@saasquatch/program-test-suite";
export default jestConfig;
Use the runProgramTests function to execute the tests. Here is an example of a typical
test program:
import { program } from "../src/program";
import { runProgramTests } from "@saasquatch/program-test-suite";
import steps from "./steps";
runProgramTests(
program,
"__tests__/features/unit",
steps,
"src/schema/birthday-program_schema.json",
"__tests__/defaults/template.json",
"__tests__/defaults/rules.json"
);