2.4.2 • Published 1 year ago

@saasquatch/program-test-suite v2.4.2

Weekly downloads
3,779
License
MIT
Repository
-
Last release
1 year ago

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 your program from the source code. This is a `types.rpc.Program` that you would
// pass to program-boilerplate
import { program } from "../src/program";
import { runProgramTests } from "@saasquatch/program-test-suite";

// Any additional custom steps you need for this particular program
import steps from "./steps";

runProgramTests(
  program,
  // Path to the .feature files containing the unit test steps
  "__tests__/features/unit",
  steps,
  // Path to the program schema
  "src/schema/birthday-program_schema.json",
  // Default program template and program rules to use while testing
  "__tests__/defaults/template.json",
  "__tests__/defaults/rules.json"
);
2.4.2

1 year ago

2.3.0

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.1.2-1

2 years ago

2.1.2-2

2 years ago

2.3.1-0

2 years ago

2.3.0-1

2 years ago

2.3.0-0

2 years ago

2.1.1

2 years ago

2.1.1-0

2 years ago

2.1.2-0

2 years ago

2.1.0-0

3 years ago

2.1.0

3 years ago

2.0.1-3

3 years ago

2.0.1-2

3 years ago

2.0.1-1

3 years ago

2.0.1-0

3 years ago

2.0.0

3 years ago

2.0.0-7

3 years ago

2.0.0-6

3 years ago

2.0.0-5

3 years ago

2.0.0-4

3 years ago

2.0.0-3

3 years ago

2.0.0-2

3 years ago

2.0.0-1

3 years ago

2.0.0-0

3 years ago

1.2.1

4 years ago

1.2.1-1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0-alpha.1

4 years ago

1.1.0-alpha.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago