How to use the @stoplight/prism-http/router/__tests__/utils.pickOneHttpMethod function in @stoplight/prism-http

To help you get started, we’ve selected a few @stoplight/prism-http 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 stoplightio / prism / packages / http / src / router / __tests__ / index.spec.ts View on Github external
test('given a concrete matching server and matched methods and unmatched path should not match', async () => {
        const url = randomUrl();
        const method = pickOneHttpMethod();
        const resource = await router.route({
          resources: [{
            id: chance.guid(),
            method,
            path: randomPath(),
            responses: [],
            servers: [{
              url: url.toString(),
            }]
          }],
          input: {
            method,
            url
          }
        });