Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How can I disable/enable a custom Helper in CLI? #4025

Closed Answered by kobenguyent
alaz-aura asked this question in Q&A
Discussion options

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?

You must be logged in to vote

Hi I guess CodeceptJS currently only supports enabling/disabling the plugins.

Replies: 2 comments 2 replies

Comment options

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 \"

You must be logged in to vote
1 reply
Comment options

ah thanks for the attempt, doesn't look like it worked for me unfortunately.

Comment options

Hi I guess CodeceptJS currently only supports enabling/disabling the plugins.

You must be logged in to vote
1 reply
Comment options

yes seems that way. Perhaps I need to convert my helper logic to be a plugin instead.

Answer selected by alaz-aura
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /