Skip to content

Error out when unsupported keys are supplied #26

@papandreou

Description

@papandreou

I just accidentally did this:

expect(..., 'with http mocked out', [
    ...,
    { url: 'DELETE http://foo.bar/quux' },
    ...
], ...);

Which should have been { request: { url: 'DELETE http://foo.bar/quux' } }. It was interpreted to mean "here any request should happen, I don't care what it looks like, just reply with a 200".

Let's go through it and ensure that we error out when any unsupported property is passed, sort of like https://github.com/unexpectedjs/unexpected-express/blob/master/lib/unexpectedExpress.js#L171-L176

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