How to use the @serenity-js/rest.CallAnApi.using function in @serenity-js/rest

To help you get started, we’ve selected a few @serenity-js/rest 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 jan-molak / serenity-js / packages / local-server / spec / reporting.spec.ts View on Github external
prepare(actor: Actor): Actor {
            return actor.whoCan(
                ManageALocalServer.runningAHttpListener(function (request, response) {
                    response.setHeader('Connection', 'close');
                    response.end('Hello World!');
                }),
                CallAnApi.using(axios.create()),
            );
        }
    }
github jan-molak / serenity-js / packages / local-server / spec / servers.spec.ts View on Github external
prepare(actor: Actor): Actor {
                    return actor.whoCan(
                        ManageALocalServer.runningAHttpsListener(restify.handler({
                            certificate:    certificates.cert,
                            key:            certificates.key,
                        })),
                        CallAnApi.using(axios.create({
                            proxy: false,
                            httpsAgent: new https.Agent({
                                cert: certificates.cert,
                                key: certificates.key,
                                rejectUnauthorized: false,
                            }),
                        })),
                    );
                }
            }

@serenity-js/rest

Serenity/JS Screenplay Pattern library for interacting with REST and other HTTP-based services, supporting comprehensive API testing and blended testing scenarios

Apache-2.0
Latest version published 1 day ago

Package Health Score

81 / 100
Full package analysis