0.2.8 • Published 3 years ago

supertest-allure-step-helper v0.2.8

Weekly downloads
303
License
MIT
Repository
github
Last release
3 years ago

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

0.2.7

3 years ago

0.2.6

3 years ago

0.2.8

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago