Skip to content

.put() does not work as expected #57

Open
@MaxGfeller

Description

@MaxGfeller

This is a little test suite i use to test a simple API:

var APIeasy = require('api-easy');

var suite = APIeasy.describe('API');

suite.use('localhost', 3000)
    .path('/users')
    .get()
        .expect(200)
    .next()

    .put({ firstName: 'Testibus', lastName: 'Testman' })
        .expect(200)

    .export(module)

However, the .get() works as expected but the .put() results in an error:

    A PUT to /users
      ✗ should respond with 200
        » expected 200,
    got  undefined (==) // api-easy.js:290
  ✗ Broken » 1 honored ∙ 1 broken (0.304s)

Am i missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions