ember-test-with-data
Version:
This Ember addon allows you to test using data attributes without sending it to live sites.
25 lines (19 loc) • 484 B
JavaScript
/* eslint-env node */
function FilterDataTestAttributesTransform() {
return {
visitor: {
Property(path) {
if(/^data-test/.test(path.node.key.name)) {
path.remove();
}
}
}
}
}
FilterDataTestAttributesTransform.baseDir = function() {
return __dirname;
};
FilterDataTestAttributesTransform.cacheKey = function() {
return 'ember-test-with-data.filter-data-test-attributes';
};
module.exports = FilterDataTestAttributesTransform;