How to use the power-assert.fail 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 recruit-tech / redux-pluto / src / server / uploaders / __test__ / UploadSample.js View on Github external
form.submit(`http://localhost:${port}${apiPath}`, (err, res) => {
      if (err) {
        assert.fail(err);
      }

      assertStream.expect({
        path: /public/
      });
      res.pipe(assertStream);
      assertStream.on("finish", () => {
        server.close();
      });
    });
  });
github atomist / microgrammar / test / integration / RealWorldTest2.ts View on Github external
it("can handle rep", () => {
        const rep = new Rep(AnyAnnotation);
        const src = `@ChangeControlled @Donkey("24", name = "Eeyore") public void magic() {}`;
        const match = rep.matchPrefix(inputStateFromString(src), {}, {});
        if (isSuccessfulMatch(match)) {
            const mmmm = match.match as any;
            assert(mmmm.$matched.trim() === `@ChangeControlled @Donkey("24", name = "Eeyore")`);

        } else {
            assert.fail("Didn't match");
        }
    });
github feugy / mini-service / test / client.js View on Github external
.then(res => {
          assert.fail(res, '', 'unexpected result')
        }, err => {
          assert(err instanceof Error)
github cloudflare / collapsify / test / plugins / postcss-flatten-url.js View on Github external
fetch: function () {
        assert.fail('should not have called fetch');
      },
      resourceLocation: 'http://example.com/'
github vanwagonet / middle-router / test / links.js View on Github external
.use('/linked/:to', ({ params, resolve }) => {
        ++called
        assert.fail('should not route due to default prevented')
        resolve()
      })
github tkqubo / codeclimate-tslint / test / fileMatcher.spec.ts View on Github external
}, error => {
          assert.fail(error);
        }, () => {
          assert(actual.length == expected.length);
github vanwagonet / middle-router / test / arguments.js View on Github external
.use('/hash', () => {
        assert.fail('must not match from hash when pathname routing')
      })
      .use(({ path }) => {
github vanwagonet / middle-router / test / links.js View on Github external
.use('/linked/:to', ({ params, resolve }) => {
        ++called
        assert.fail('should not route due to target attribute')
      })
github cloudflare / collapsify / test / collapsers / javascript.js View on Github external
.then(function () {
        assert.fail('expected rejected promise');
      }, function (err) {
        assert(err);