Created
August 7, 2018 19:16
-
-
Save merken/0b26ef12355834b407a99eb4ac665db9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
module.exports = function dataCyLoader(source) { | |
var dataAttr= 'data-cy=\"([^"]*)\"'; | |
if(source.match(dataAttr)){ | |
source = source.replace(new RegExp(dataAttr, 'g'), ''); | |
} | |
return source; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment