How to use the @octokit/fixtures.mock function in @octokit/fixtures

To help you get started, we’ve selected a few @octokit/fixtures 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 node-gh / gh / test / issue.js View on Github external
it('formatted issue output should match mock formatted issues', () => {
            const mock = fixtures.mock('api.github.com/search-issues')

            const query = `sesame repo:octokit-fixture-org/search-issues`

            const options = {
                all: false,
                search: query,
                detailed: true,
            }

            Impl.prototype.search(null, null, callback, options, mock)

            function callback(err, formattedIssues) {
                expect(mockFormattedIssues).to.equal(formattedIssues)
            }
        })
    })

@octokit/fixtures

Fixtures for all the octokittens

MIT
Latest version published 7 months ago

Package Health Score

75 / 100
Full package analysis

Popular @octokit/fixtures functions

Similar packages