@rapidjs.org/testing-cli
v0.1.0
Published
rJS Testing – CLI testing suite.
Downloads
8
Readme
rJS Testing CLITest cli
rJS Testing CLI testing suite (CLITest
): Test command line interfaces based on stdout and -err.
npm i -D @rapidjs.org/testing-cli
npx rjs-test cli <tests-path>
Integrated in
rapidjs-org/testing
.
Configuration
In order to define common CLI aspects, they can be defined through the static .configure()
method:
HTTPTest.configure(configuration: RequestOptions & {
commonBinary?: string;
});
Test Anatomy
Expressions
Actual
.actual(binary: string, arg?: string[])
.actual(args: string[]) // imply binary if defined a common
Expected
.expected(binary: string, arg?: string[])
.expected(args: string[]) // imply binary if defined a common
Value-based Assertion
new CLITest("List files")
.actual(<expression>)
.expected(<expression>);
Comparison Strategy
...
✅ SUCCESS
.actual(<expression>)
.expected(<expression>)
❌ FAILURE
.actual(<expression>)
.expected(<expression>)
© Thassilo Martin Schiepanski