Skip to content

Conversation

@sdetweil
Copy link
Collaborator

in some cases the modulename.js may need to detect running in test mode (compliments pr #3630)

window.name is not set web mode

add a new field to the index.html
window.intest
and use the server_function to replace the hard coded string like we do for window.mmversion=#VERSION#
then change the two test helpers to set the env variable
app.js detects and sets global.intest=true
server func replace with value of global.intest

then module can use if(window.intest)

@sdetweil
Copy link
Collaborator Author

enhancement for #3610

@sdetweil sdetweil self-assigned this Nov 11, 2024
@rejas rejas merged commit 56cb536 into MagicMirrorOrg:develop Nov 12, 2024
@sdetweil sdetweil deleted the add_test_flag_for_browser_side branch November 12, 2024 14:59
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

Successfully merging this pull request may close these issues.

2 participants