Skip to content
Discussion options

You must be logged in to vote

There are multiple ways. I am no expert on DevExpress, so can only give "general" advise here.

First and foremost, you could just mock the call as described, You did getDeviceInfo but the JS Call in question UtilsModule.getDeviceInfo. Assuming DevExpress defines those types like:

export const UtilsModule = {
  getDeviceInfo() { ... }
}

Now here a bit of salt. There is a different route you can take: Substituting (mocking) components. If you have a unit test, you don't want to rely on 3rd party behavior. So you can create your own fake/stub of DxDropDownButton that mimicks the public API (aka ParameterAttribute and so on). Bring the 3rd party component under your control!

Replies: 1 comment 1 reply

Comment options

linkdotnet
Nov 14, 2025
Maintainer Sponsor

You must be logged in to vote
1 reply
@chanchangreatness
Comment options

Answer selected by chanchangreatness
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