Skip to content

Codemod for ember-test-selectors users to migrate from positional params to named arguments

License

Notifications You must be signed in to change notification settings

mainmatter/ember-test-selectors-params-codemod

Repository files navigation

ember-test-selectors-params-codemod

Codemod for ember-test-selectors users to migrate from positional params to named arguments

Description

ember-test-selectors allowed developers to use positional arguments:

{{some-component data-test-foo}}

... instead of named arguments for their test selectors:

{{some-component data-test-foo=true}}

This was done to have a more convenient API in some cases but turned out to cause confusion and is no longer needed when using Angle Bracket Syntax:

<SomeComponent data-test-foo />

This codemod will turn positional data-test-foo selectors into their equivalent data-test-foo=true named selector.

Usage

npx ember-test-selectors-params-codemod

This will automatically run the codemod on all .hbs files in your app and addon folders (if they exist). If you want to run the codemod on other folders or files you can also pass a glob pattern:

npx ember-test-selectors-params-codemod /some/other/folder/**/*.hbs

License

This projects is developed by and © Mainmatter GmbH and contributors. It is released under the MIT License.

About

Codemod for ember-test-selectors users to migrate from positional params to named arguments

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •