Last active
February 7, 2018 15:05
-
-
Save agneym/0a1e2c7dc4671735504912f83b44cf67 to your computer and use it in GitHub Desktop.
Convert hasClass to classes() codemod.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
codemod "expect\((.*?)\.hasClass\(('.*?')\)\)\.to\.equal\(true\)" 'expect(\1.classes()).to.include(\2)' | |
codemod "expect\((.*?)\.hasClass\(('.*?')\)\)\.to\.equal\(false\)" 'expect(\1.classes()).to.not.include(\2)' | |
codemod "expect\((.*?)\.hasAttribute\(('.*?'),('.*?')\)\)\.to\.equal\(true\);" '' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment