New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

supertest-allure-step-helper

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

supertest-allure-step-helper

allure helper for supertest

latest
Source
npmnpm
Version
0.2.8
Version published
Maintainers
1
Created
Source

supertest-allure-step-helper

NPM version npm download

Introduce

turns the calls of supertest to allure.createStep()

Install

$ npm i -D supertest-allure-step-helper

Usage

  const HOST = 'https://github.com';
  const toPath = '/RickyLi79';
  const query = { tab: 'repositories', 'type': 'public' };

  @test('expect `success`')
  public async test1() {
    const supertestAgent = supertest.agent(HOST);
    const agent = AllureStepProxy.create(supertestAgent); // create
    await agent
      .stepName('visit') // optional, add by `supertest-allure-step-helper` 
      .get(toPath)
      .query(query)
      .expect(200)
      .expectHeader('server', 'GitHub.com') // not a `supertest` function, add by `supertest-allure-step-helper` 
      .endAllureStep(); // this MUST be called at finnal
  }

Demo Screenshot

Image Image

Example

./allure.test/example.allure.ts

Example Report HTML

Keywords

mocha

FAQs

Package last updated on 24 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts