How to use the power-assert.strictEqual 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 STRML / react-router-component / tests / unit / matchRoutes.js View on Github external
it('matches /cat/:id with a custom url-pattern options and periods in param', function() {
    var match = matchRoutes(routes, '/cat/hello.with.periods', null, {
      segmentValueCharset: 'a-zA-Z0-9_\\- %\\.'
    });
    assert(match.route);
    assert.strictEqual(match.route.props.handler.props.name, 'cat');
    assert.deepEqual(match.match, {id: 'hello.with.periods'});
    assert.strictEqual(match.path, '/cat/hello.with.periods');
    assert.strictEqual(match.matchedPath, '/cat/hello.with.periods');
    assert.strictEqual(match.unmatchedPath, null);
  });
github atomist / automation-client / test / command / onCommand.ts View on Github external
it("should pass string through unmodified", () => {
        const result = parseRegExIntent("foo");
        assert.strictEqual(result, "foo");
    });
    it("should pass string array through unmodified", () => {
github kjirou / escape-from-the-maze / test / stores / GameStore.es6 View on Github external
it('_crushWallByPlayer', function() {
    var store = _createGameStore();
    store._prepare();
    store._picksCount = 1;
    let playerPos = store._maze.searchThingPos(store._things.player);
    let upperPos = [playerPos[0] - 1, playerPos[1]];
    let wallAtUpper = store._maze.getCellOrError(upperPos).getThing();
    assert.strictEqual(wallAtUpper.getTypeId(), 'wall');
    store._crushWallByPlayer(MazeModel.DIRECTIONS.UP);
    let crushedThing = store._maze.getCellOrError(upperPos).getThing();
    assert.strictEqual(crushedThing, null);
    assert.strictEqual(store._picksCount, 0);
  });
github kt3k / kocha / packages / kocha / src / __tests__ / index.js View on Github external
it('stringifies the given object. See https://github.com/twada/stringifier for details', () => {
      const str = kocha.stringify({ foo: 1, bar: new Date(0) })

      assert.strictEqual(str, 'Object{foo:1,bar:new Date("1970-01-01T00:00:00.000Z")}')
    })
  })
github kjirou / escape-from-the-maze / test / stores / ScreenStore.es6 View on Github external
it('pageId', function() {
    var store = new ScreenStore();
    store._pageId = 'foo';
    assert.strictEqual(store.pageId, 'foo');
  });
});
github kt3k / kocha / packages / karma-kocha / __tests__ / adaptor.js View on Github external
it('returns message + stack if message is not in stack', () => {
      const stack = 'foo\n'
      const message = 'bar'

      assert.strictEqual(formatError({ stack, message }), 'bar\nfoo\n')
    })
github recruit-tech / agreed-core / test / lib / server.strict.js View on Github external
.request(options, res => {
        assert.strictEqual(res.statusCode, 500);
        res.resume();
        server.close();
      })
      .on("error", console.error);
github kt3k / kocha / packages / kocha / src / __tests__ / index.js View on Github external
return runner.run().then(() => {
        assert.strictEqual(runner.tests[0].getRetryCount(), 7)
        assert.strictEqual(runner.tests[1].getRetryCount(), 0)
        td.verify(spy0(), { times: 8 })
        td.verify(spy1(), { times: 1 })
      })
    })
github karen-irc / option-t / test / option-t / test_as_promise.js View on Github external
return shouldRejected(promise).catch(function(error){
                assert.strictEqual(error, undefined);
            });
        });