How to use the assertive.resolves function in assertive

To help you get started, we’ve selected a few assertive 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 jarrodldavis / probot-gpg / test / validate-gpg.js View on Github external
async function testScenario(baseVerified, middleVerified, headVerified) {
    const [baseCommit, middleCommit, headCommit] = [baseVerified, middleVerified, headVerified].map(createCommit);
    const githubMock = new GitHubMock();

    sinon.stub(githubMock.repos, 'compareCommits').resolves({
      data: { commits: [headCommit, middleCommit, baseCommit] }
    });

    return assert.resolves(validateGpg(githubMock, new ContextMock(), baseCommit.commit.sha, headCommit.commit.sha));
  }

assertive

Assertive is a terse yet expressive assertion library

BSD-3-Clause
Latest version published 4 years ago

Package Health Score

49 / 100
Full package analysis