Skip to content

Bunit.JSRuntimeUnhandledInvocationException : The invocation of 'blazorise.button.initialize' with arguments ... was not expected. #305

Answered by egil
jjones-ucpm asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jjones-ucpm

Ill just give a quick answer before heading to bed, excuse the brevity on this one.

The short answer is, that it is not a bug. Preview 1 has JSinterop enabled by default and set to strict mode. See https://github.com/egil/bUnit/releases/tag/v1.0.0-preview-01 for details.

To fix it. try setting test.JSInterop.Mode = JSRuntimeMode.Loose in your setup methods.

Ps. preview 01 is also compatible with netcoreapp3.1, so feel free to use the same version everywhere.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by egil
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #304 on January 23, 2021 16:31.