How to use the @accordproject/ergo-test/lib/util.compareSuccess function in @accordproject/ergo-test

To help you get started, we’ve selected a few @accordproject/ergo-test 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 accordproject / cicero / packages / cicero-test / lib / steps.js View on Github external
.then((actualAnswer) => {
            this.answer = actualAnswer;
            expect(actualAnswer).to.have.property('state');
            expect(actualAnswer).to.not.have.property('error');
            return Util.compareSuccess({ state },actualAnswer);
        });
});
github accordproject / cicero / packages / cicero-test / lib / steps.js View on Github external
Then('it should respond with', function (expectedResponse) {
    const response = JSON.parse(expectedResponse);
    if (this.answer) {
        expect(this.answer).to.have.property('response');
        expect(this.answer).to.not.have.property('error');
        return Util.compareSuccess({ response },this.answer);
    } else {
        return trigger(this.engine,this.clause,this.request,this.state,this.currentTime)
            .then((actualAnswer) => {
                this.answer = actualAnswer;
                expect(actualAnswer).to.have.property('response');
                expect(actualAnswer).to.not.have.property('error');
                return Util.compareSuccess({ response },actualAnswer);
            });
    }
});

@accordproject/ergo-test

Ergo Test

Apache-2.0
Latest version published 2 years ago

Package Health Score

45 / 100
Full package analysis

Similar packages