Skip to content

Instantly share code, notes, and snippets.

@merken
Created August 7, 2018 19:16
Show Gist options
  • Save merken/0b26ef12355834b407a99eb4ac665db9 to your computer and use it in GitHub Desktop.
Save merken/0b26ef12355834b407a99eb4ac665db9 to your computer and use it in GitHub Desktop.
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