Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 577 Bytes

README.md

File metadata and controls

22 lines (14 loc) · 577 Bytes

Build Status

swagger-api-tester

Create lightweight smoke tests against HTTP APIs using swagger docs to inform validations.

Example

'use strict'

const Tester = require('swagger-api-tester')

describe('My API', function () {
  const test = new Tester('http://petstore.swagger.io/v2/swagger.json')

  test.post('/pet', pet).respondsWith(200, 'Pet')
  test.put('/pet', pet).respondsWith(200)

  test.get('/pet/20').respondsWith(200)
})