Skip to content

"Unexpected Parameter" TypeError when target is undefined #1969

Description

@nwhittaker

The assert.dom() type allows for passing undefined as the target parameter:

assert.dom(undefined).exists();

However, doing so results in a TypeError:

TypeError: Unexpected Parameter: undefined
    at DOMAssertions.findElement (https://localhost:7357/assets/test-support.js:12711:15)
    at DOMAssertions.findTargetElement (https://localhost:7357/assets/test-support.js:12684:21)
    at DOMAssertions.hasText (https://localhost:7357/assets/test-support.js:12215:26)
    at Object.<anonymous> (https://localhost:7357/assets/tests.js:22408:20)

I'd expect invoking assert.dom in this way to behave the same way as invoking assert.dom() without any parameters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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