How to use the @serenity-js/assertions.Check.whether function in @serenity-js/assertions

To help you get started, we’ve selected a few @serenity-js/assertions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jan-molak / serenity-js / packages / serenity-bdd / src / cli / screenplay / tasks / InvokeSerenityBDD.ts View on Github external
.then(([ args, props ]) =>
                actor.attemptsTo(
                    Check
                        .whether(FileExists.at(this.pathToArtifact), equals(false))
                        .andIfSo(TerminateFlow.because(
                            `I couldn't access the Serenity BDD CLI at ${ this.pathToArtifact.value }. ` +
                            `Did you remember to run \`serenity-bdd update\`?`,
                        )),
                    // todo: check if reports exist before invoking the jar?
                    Spawn.the(new JavaExecutable(), ...props, '-jar', this.pathToArtifact.value, ...args),
                ),
        );