How to use the @serenity-js/assertions.ExpectationNotMet 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 / protractor / src / expectations / ElementFinderExpectation.ts View on Github external
promiseOf(this.fn(actual)).then(_ => _
                ? new ExpectationMet(this.toString(), null, actual)
                : new ExpectationNotMet(this.toString(), null, actual),
            );
github jan-molak / serenity-js / packages / protractor / src / expectations / combined.ts View on Github external
and(...this.expectations).answeredBy(actor)(actual).then(_ => _ instanceof ExpectationMet
                ? new ExpectationMet(this.message, _.expected, _.actual)
                : new ExpectationNotMet(_.message, _.expected, _.actual));
    }