Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only strip attribute *starting* with data-test- #292

Merged
merged 1 commit into from
Dec 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion node-tests/fixtures/default/expected.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ var _ember2 = _interopRequireDefault(_ember);

exports['default'] = _ember2['default'].Component.extend({
foo: 'foo',
'data-test': 'test'
'data-test': 'test',
'metadata-test-foo': 'metadata'
});
module.exports = exports['default'];
3 changes: 2 additions & 1 deletion node-tests/fixtures/default/expected6.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ import Ember from 'ember';

export default Ember.Component.extend({
foo: 'foo',
'data-test': 'test'
'data-test': 'test',
'metadata-test-foo': 'metadata'
});
3 changes: 2 additions & 1 deletion node-tests/fixtures/default/expected7.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Ember from 'ember';
export default Ember.Component.extend({
foo: 'foo',
'data-test': 'test'
'data-test': 'test',
'metadata-test-foo': 'metadata'
});
1 change: 1 addition & 0 deletions node-tests/fixtures/default/fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Ember from 'ember';
export default Ember.Component.extend({
foo: 'foo',
'data-test': 'test',
'metadata-test-foo': 'metadata',
'data-test-foo': 'foo',
'data-test-foobar': Ember.computed('data-test-foo', function() {
return `${this.get('data-test-foo')}bar`
Expand Down
2 changes: 1 addition & 1 deletion strip-data-test-properties-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* eslint-env node */

let TEST_SELECTOR_PREFIX = /data-test-.*/;
let TEST_SELECTOR_PREFIX = /^data-test-.*/;

function StripDataTestPropertiesPlugin(babel) {
return new babel.Plugin('ember-test-selectors', {
Expand Down
2 changes: 1 addition & 1 deletion strip-data-test-properties-plugin6.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* eslint-env node */

let TEST_SELECTOR_PREFIX = /data-test-.*/;
let TEST_SELECTOR_PREFIX = /^data-test-.*/;

function StripDataTestPropertiesPlugin() {
return {
Expand Down