diff --git a/index.js b/index.js index 4fe22377..df329ac4 100644 --- a/index.js +++ b/index.js @@ -35,6 +35,14 @@ module.exports = { plugin: StripTestSelectorsTransform, baseDir: function() { return __dirname; } }); + } else { + var TransformTestSelectorParamsToHashPairs = require('./transform-test-selector-params-to-hash-pairs'); + + registry.add('htmlbars-ast-plugin', { + name: 'transform-test-selector-params-to-hash-pairs', + plugin: TransformTestSelectorParamsToHashPairs, + baseDir: function() { return __dirname; } + }); } } }, diff --git a/tests/acceptance/bind-data-test-attributes-in-components-test.js b/tests/acceptance/bind-data-test-attributes-in-components-test.js index 3562f661..43abddf1 100644 --- a/tests/acceptance/bind-data-test-attributes-in-components-test.js +++ b/tests/acceptance/bind-data-test-attributes-in-components-test.js @@ -47,5 +47,8 @@ if (!config.stripTestSelectors) { assert.equal(find('.test6').find('div[data-non-test]').length, 0, 'data-non-test does not exists'); }); -} + test('it binds data-test-* attributes without values on components', function (assert) { + assert.equal(find('.test7').find('div[data-test-without-value]').length, 1, 'data-test-without-value exists'); + }); +} diff --git a/tests/dummy/app/templates/bind-test.hbs b/tests/dummy/app/templates/bind-test.hbs index 98364b18..90aa2493 100644 --- a/tests/dummy/app/templates/bind-test.hbs +++ b/tests/dummy/app/templates/bind-test.hbs @@ -9,3 +9,5 @@