Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unexpected Parameter" TypeError when target is undefined #1969

Open
nwhittaker opened this issue Jun 27, 2023 · 0 comments
Open

"Unexpected Parameter" TypeError when target is undefined #1969

nwhittaker opened this issue Jun 27, 2023 · 0 comments

Comments

@nwhittaker
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant