-
-
Notifications
You must be signed in to change notification settings - Fork 751
How can I disable/enable a custom Helper in CLI? #4025
-
Howdy 👋
So I have a custom API helper created. I want to enable/disbale the active state of the helper when running with CLI.
Here's an example from my codecept.conf.ts helper
"CustomHelper": {
require: './helpers/custom_helper.ts', // path to module
'enabled': true
}
Although it's true now, I want to toggle the enabled flag. Any ideas how I can do this?
Beta Was this translation helpful? Give feedback.
All reactions
Hi I guess CodeceptJS currently only supports enabling/disabling the plugins.
Replies: 2 comments 2 replies
-
https://codecept.io/commands/#run
npx codeceptjs run --override '{ "helpers": {"CustomHelper": {"enabled": "false"}}}'
If it does not work right away, try to escape some " as \"
Beta Was this translation helpful? Give feedback.
All reactions
-
ah thanks for the attempt, doesn't look like it worked for me unfortunately.
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi I guess CodeceptJS currently only supports enabling/disabling the plugins.
Beta Was this translation helpful? Give feedback.
All reactions
-
yes seems that way. Perhaps I need to convert my helper logic to be a plugin instead.
Beta Was this translation helpful? Give feedback.