How to use the power-assert._expr function in power-assert

To help you get started, we’ve selected a few power-assert 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 power-assert-js / grunt-espower / test / expected / subdir / test_in_subdir.js View on Github external
it('should return -1 when the value is not present', function () {
            var zero = 0, two = 2;
            assert(assert._expr(assert._capt(assert._capt(assert._capt(this.ary, 'arguments/0/left/callee/object').indexOf(assert._capt(zero, 'arguments/0/left/arguments/0')), 'arguments/0/left') === assert._capt(two, 'arguments/0/right'), 'arguments/0'), {
                content: 'assert(this.ary.indexOf(zero) === two)',
                filepath: 'test/fixtures/subdir/test_in_subdir.js',
                line: 10
            }));
        });
        it('should return index when the value is present', function () {
github power-assert-js / grunt-espower / test / expected / subdir / test_in_subdir.js View on Github external
it('should return index when the value is present', function () {
            var minusOne = -1, two = 2;
            assert.ok(assert._expr(assert._capt(assert._capt(assert._capt(this.ary, 'arguments/0/left/callee/object').indexOf(assert._capt(two, 'arguments/0/left/arguments/0')), 'arguments/0/left') === assert._capt(minusOne, 'arguments/0/right'), 'arguments/0'), {
                content: 'assert.ok(this.ary.indexOf(two) === minusOne, \'THIS IS AN ASSERTION MESSAGE\')',
                filepath: 'test/fixtures/subdir/test_in_subdir.js',
                line: 14
            }), 'THIS IS AN ASSERTION MESSAGE');
        });
    });
github power-assert-js / grunt-espower / test / expected / typescript_mocha_node.js View on Github external
it('should return index when the value is present', function () {
            var minusOne = -1, two = 2;
            assert.ok(assert._expr(assert._capt(assert._capt(assert._capt(ary, 'arguments/0/left/callee/object').indexOf(assert._capt(two, 'arguments/0/left/arguments/0')), 'arguments/0/left') === assert._capt(minusOne, 'arguments/0/right'), 'arguments/0'), {
                content: 'assert.ok(ary.indexOf(two) === minusOne, \'THIS IS AN ASSERTION MESSAGE\')',
                filepath: 'typescript_mocha_node.ts',
                line: 22
            }), 'THIS IS AN ASSERTION MESSAGE');
        });
    });
github power-assert-js / grunt-espower / test / expected / mocha_node.js View on Github external
it('should return -1 when the value is not present', function () {
            var zero = 0, two = 2;
            assert(assert._expr(assert._capt(assert._capt(assert._capt(this.ary, 'arguments/0/left/callee/object').indexOf(assert._capt(zero, 'arguments/0/left/arguments/0')), 'arguments/0/left') === assert._capt(two, 'arguments/0/right'), 'arguments/0'), {
                content: 'assert(this.ary.indexOf(zero) === two)',
                filepath: 'test/fixtures/mocha_node.js',
                line: 10
            }));
        });
        it('should return index when the value is present', function () {
github power-assert-js / grunt-espower / test / expected / mocha_node.js View on Github external
it('should return index when the value is present', function () {
            var minusOne = -1, two = 2;
            assert.ok(assert._expr(assert._capt(assert._capt(assert._capt(this.ary, 'arguments/0/left/callee/object').indexOf(assert._capt(two, 'arguments/0/left/arguments/0')), 'arguments/0/left') === assert._capt(minusOne, 'arguments/0/right'), 'arguments/0'), {
                content: 'assert.ok(this.ary.indexOf(two) === minusOne, \'THIS IS AN ASSERTION MESSAGE\')',
                filepath: 'test/fixtures/mocha_node.js',
                line: 14
            }), 'THIS IS AN ASSERTION MESSAGE');
        });
    });
github power-assert-js / grunt-espower / test / expected / typescript_mocha_node.js View on Github external
it('should return -1 when the value is not present', function () {
            var zero = 0, two = 2;
            assert(assert._expr(assert._capt(assert._capt(assert._capt(ary, 'arguments/0/left/callee/object').indexOf(assert._capt(zero, 'arguments/0/left/arguments/0')), 'arguments/0/left') === assert._capt(two, 'arguments/0/right'), 'arguments/0'), {
                content: 'assert(ary.indexOf(zero) === two)',
                filepath: 'typescript_mocha_node.ts',
                line: 18
            }));
        });
        it('should return index when the value is present', function () {