Skip to content

Accept null or undefined as value #53

@isaacaggrey

Description

@isaacaggrey

Current behavior:

unroll('should be okay with id being #id', (done, testArgs) => {
    let object = { id: testArgs.id };
    expect(object.id).toEqual(testArgs.id);
    done();
},
`
    where:
    id
    ${null}
    ${undefined}
`
);

// Output:
     encountered a declaration exception
    Error: title not expanded as incorrect args passed in

Expected behavior:

✔ should be okay with id being null
✔ should be okay with id being undefined

Granted, I understand with the dataTable method this is a bit tricky since it is a template literal (i.e., what if someone wants to test the string "null" or "undefined", not sure what is expected behavior), but I think the dataArray method should be valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions