diff --git a/.eslintrc.js b/.eslintrc.js
index 63057a86..a35ef600 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -1,9 +1,6 @@
module.exports = {
root: true,
- extends: [
- 'simplabs',
- 'simplabs/plugins/ember',
- ],
+ extends: ['simplabs', 'simplabs/plugins/ember', 'plugin:prettier/recommended'],
rules: {
'ember/avoid-leaking-state-in-components': 'off',
'ember/local-modules': 'off',
@@ -21,12 +18,7 @@ module.exports = {
'config/**/*.js',
'tests/dummy/config/**/*.js',
],
- excludedFiles: [
- 'addon/**',
- 'addon-test-support/**',
- 'app/**',
- 'tests/dummy/app/**',
- ],
+ excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015,
@@ -38,12 +30,10 @@ module.exports = {
},
// node test files
{
- files: [
- 'node-tests/*.js',
- ],
+ files: ['node-tests/*.js'],
parserOptions: {
sourceType: 'script',
- ecmaVersion: 2015
+ ecmaVersion: 2015,
},
env: {
browser: false,
diff --git a/.prettierrc.js b/.prettierrc.js
new file mode 100644
index 00000000..5fc721cf
--- /dev/null
+++ b/.prettierrc.js
@@ -0,0 +1,8 @@
+'use strict';
+
+module.exports = {
+ arrowParens: 'avoid',
+ printWidth: 100,
+ singleQuote: true,
+ trailingComma: 'es5',
+};
diff --git a/config/ember-try.js b/config/ember-try.js
index 57a0ec3c..2a13a121 100644
--- a/config/ember-try.js
+++ b/config/ember-try.js
@@ -4,12 +4,12 @@
const getChannelURL = require('ember-source-channel-url');
-module.exports = function() {
+module.exports = function () {
return Promise.all([
getChannelURL('release'),
getChannelURL('beta'),
getChannelURL('canary'),
- ]).then((urls) => {
+ ]).then(urls => {
return {
usePnpm: true,
command: 'pnpm test',
@@ -67,33 +67,33 @@ module.exports = function() {
name: 'ember-release',
npm: {
devDependencies: {
- 'ember-source': urls[0]
- }
- }
+ 'ember-source': urls[0],
+ },
+ },
},
{
name: 'ember-beta',
npm: {
devDependencies: {
- 'ember-source': urls[1]
- }
- }
+ 'ember-source': urls[1],
+ },
+ },
},
{
name: 'ember-canary',
npm: {
devDependencies: {
- 'ember-source': urls[2]
- }
- }
+ 'ember-source': urls[2],
+ },
+ },
},
{
name: 'ember-default',
npm: {
- devDependencies: {}
- }
- }
- ]
+ devDependencies: {},
+ },
+ },
+ ],
};
});
};
diff --git a/config/environment.js b/config/environment.js
index 012a412f..9b5d25d2 100644
--- a/config/environment.js
+++ b/config/environment.js
@@ -1,6 +1,6 @@
/* eslint-env node */
'use strict';
-module.exports = function(/* environment, appConfig */) {
- return { };
+module.exports = function (/* environment, appConfig */) {
+ return {};
};
diff --git a/config/targets.js b/config/targets.js
index faf00572..54744594 100644
--- a/config/targets.js
+++ b/config/targets.js
@@ -1,10 +1,5 @@
/* eslint-env node */
module.exports = {
- browsers: [
- 'ie 9',
- 'last 1 Chrome versions',
- 'last 1 Firefox versions',
- 'last 1 Safari versions',
- ],
+ browsers: ['ie 9', 'last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'],
};
diff --git a/ember-cli-build.js b/ember-cli-build.js
index 11edd19e..2b7592ec 100644
--- a/ember-cli-build.js
+++ b/ember-cli-build.js
@@ -4,7 +4,7 @@
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
-module.exports = function(defaults) {
+module.exports = function (defaults) {
let stripTestSelectors = process.env['STRIP_TEST_SELECTORS'];
let app = new EmberAddon(defaults, {
@@ -13,8 +13,8 @@ module.exports = function(defaults) {
},
'ember-test-selectors': {
- strip: Boolean(stripTestSelectors)
- }
+ strip: Boolean(stripTestSelectors),
+ },
});
/*
diff --git a/index.js b/index.js
index 24d7bc2e..a406a97f 100644
--- a/index.js
+++ b/index.js
@@ -15,11 +15,14 @@ module.exports = {
let addonOptions = appOptions['ember-test-selectors'] || {};
if (addonOptions.environments) {
- ui.writeDeprecateLine('The "environments" option in "ember-test-selectors" has been replaced ' +
- 'with the "strip" option. Use e.g. "strip: EmberApp.env() === \'production\'" instead to ' +
- 'recreate the old behavior.', false);
-
- this._stripTestSelectors = (addonOptions.environments.indexOf(app.env) !== -1);
+ ui.writeDeprecateLine(
+ 'The "environments" option in "ember-test-selectors" has been replaced ' +
+ 'with the "strip" option. Use e.g. "strip: EmberApp.env() === \'production\'" instead to ' +
+ 'recreate the old behavior.',
+ false
+ );
+
+ this._stripTestSelectors = addonOptions.environments.indexOf(app.env) !== -1;
} else if ('strip' in addonOptions) {
this._stripTestSelectors = addonOptions.strip;
} else {
@@ -27,8 +30,11 @@ module.exports = {
}
if ('patchClassicComponent' in addonOptions) {
- ui.writeDeprecateLine('[ember-test-selectors] The `patchClassicComponent` option is obsolete. ' +
- 'You can remove it from your `ember-cli-build.js` file.', false);
+ ui.writeDeprecateLine(
+ '[ember-test-selectors] The `patchClassicComponent` option is obsolete. ' +
+ 'You can remove it from your `ember-cli-build.js` file.',
+ false
+ );
}
},
@@ -65,10 +71,14 @@ module.exports = {
if (checker.satisfies('^6.0.0-beta.1') || checker.satisfies('^7.0.0')) {
appOrParent.options.babel6 = appOrParent.options.babel6 || {};
appOrParent.options.babel6.plugins = appOrParent.options.babel6.plugins || [];
- appOrParent.options.babel6.plugins.push(require.resolve('./strip-data-test-properties-plugin6'));
+ appOrParent.options.babel6.plugins.push(
+ require.resolve('./strip-data-test-properties-plugin6')
+ );
} else {
- this.ui.writeWarnLine('ember-test-selectors: You are using an unsupported ember-cli-babel version. data-test ' +
- 'properties are not automatically stripped from your JS code.');
+ this.ui.writeWarnLine(
+ 'ember-test-selectors: You are using an unsupported ember-cli-babel version. data-test ' +
+ 'properties are not automatically stripped from your JS code.'
+ );
}
this._registeredWithBabel = true;
@@ -88,7 +98,11 @@ module.exports = {
// remove the unit tests if we're testing ourself and are in strip mode.
// we do this because these tests depend on the "addon" and "app" folders being available,
// which is not the case if they are stripped out of the build.
- if (type === 'test' && this._stripTestSelectors && this.project.name() === 'ember-test-selectors') {
+ if (
+ type === 'test' &&
+ this._stripTestSelectors &&
+ this.project.name() === 'ember-test-selectors'
+ ) {
tree = require('broccoli-stew').rm(tree, 'dummy/tests/unit/**/*.js');
}
return tree;
diff --git a/node-tests/.eslintrc.js b/node-tests/.eslintrc.js
index 8b0756b2..42275b7c 100644
--- a/node-tests/.eslintrc.js
+++ b/node-tests/.eslintrc.js
@@ -1,5 +1,5 @@
module.exports = {
env: {
- mocha: true
+ mocha: true,
},
};
diff --git a/node-tests/strip-data-test-properties-plugin-test.js b/node-tests/strip-data-test-properties-plugin-test.js
index ab7d1720..acfae1b9 100644
--- a/node-tests/strip-data-test-properties-plugin-test.js
+++ b/node-tests/strip-data-test-properties-plugin-test.js
@@ -6,7 +6,7 @@ let babel7 = require('@babel/core');
let StripDataTestPropertiesPlugin6 = require('../strip-data-test-properties-plugin6');
function testFixture(name) {
- it(`fixture: ${name}`, function() {
+ it(`fixture: ${name}`, function () {
let fixturePath = `${__dirname}/fixtures/${name}/fixture.js`;
let expectedPath = `${__dirname}/fixtures/${name}/expected7.js`;
@@ -20,7 +20,6 @@ function testFixture(name) {
});
}
-describe('StripDataTestProperties plugin', function() {
+describe('StripDataTestProperties plugin', function () {
testFixture('default');
});
-
diff --git a/package.json b/package.json
index 0adb0bde..6943ac1b 100644
--- a/package.json
+++ b/package.json
@@ -48,12 +48,15 @@
"ember-source-channel-url": "3.0.0",
"ember-try": "2.0.0",
"eslint": "8.3.0",
+ "eslint-config-prettier": "8.3.0",
"eslint-config-simplabs": "0.4.0",
"eslint-plugin-ember": "10.5.8",
+ "eslint-plugin-prettier": "4.0.0",
"eslint-plugin-qunit": "7.1.0",
"lerna-changelog": "2.2.0",
"loader.js": "4.7.0",
"mocha": "9.1.3",
+ "prettier": "2.5.0",
"qunit": "2.17.2",
"qunit-dom": "2.0.0",
"release-it": "14.11.8",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e7e9f76a..15236537 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -22,12 +22,15 @@ specifiers:
ember-source-channel-url: 3.0.0
ember-try: 2.0.0
eslint: 8.3.0
+ eslint-config-prettier: 8.3.0
eslint-config-simplabs: 0.4.0
eslint-plugin-ember: 10.5.8
+ eslint-plugin-prettier: 4.0.0
eslint-plugin-qunit: 7.1.0
lerna-changelog: 2.2.0
loader.js: 4.7.0
mocha: 9.1.3
+ prettier: 2.5.0
qunit: 2.17.2
qunit-dom: 2.0.0
release-it: 14.11.8
@@ -58,12 +61,15 @@ devDependencies:
ember-source-channel-url: 3.0.0
ember-try: 2.0.0
eslint: 8.3.0
+ eslint-config-prettier: 8.3.0_eslint@8.3.0
eslint-config-simplabs: 0.4.0_eslint@8.3.0
eslint-plugin-ember: 10.5.8_eslint@8.3.0
+ eslint-plugin-prettier: 4.0.0_d8c6a2a4ba8850181fffb74d8e835cec
eslint-plugin-qunit: 7.1.0_eslint@8.3.0
lerna-changelog: 2.2.0
loader.js: 4.7.0
mocha: 9.1.3
+ prettier: 2.5.0
qunit: 2.17.2
qunit-dom: 2.0.0
release-it: 14.11.8
@@ -5167,6 +5173,15 @@ packages:
source-map: 0.6.1
dev: true
+ /eslint-config-prettier/8.3.0_eslint@8.3.0:
+ resolution: {integrity: sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==}
+ hasBin: true
+ peerDependencies:
+ eslint: '>=7.0.0'
+ dependencies:
+ eslint: 8.3.0
+ dev: true
+
/eslint-config-simplabs/0.4.0_eslint@8.3.0:
resolution: {integrity: sha1-GZkTv800gGIddtxGcJPG544lAx8=}
peerDependencies:
@@ -5197,6 +5212,23 @@ packages:
snake-case: 3.0.4
dev: true
+ /eslint-plugin-prettier/4.0.0_d8c6a2a4ba8850181fffb74d8e835cec:
+ resolution: {integrity: sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ==}
+ engines: {node: '>=6.0.0'}
+ peerDependencies:
+ eslint: '>=7.28.0'
+ eslint-config-prettier: '*'
+ prettier: '>=2.0.0'
+ peerDependenciesMeta:
+ eslint-config-prettier:
+ optional: true
+ dependencies:
+ eslint: 8.3.0
+ eslint-config-prettier: 8.3.0_eslint@8.3.0
+ prettier: 2.5.0
+ prettier-linter-helpers: 1.0.0
+ dev: true
+
/eslint-plugin-qunit/7.1.0_eslint@8.3.0:
resolution: {integrity: sha512-w1+iL/+idpHGNgWYKknY7uPA3EaVDgl4HT4ndkNM2ONr/MW3FTM3FLRpy6yDZ5YE3km372Ym9Vr/N28E3OI6Jg==}
engines: {node: 12.x || 14.x || >=16.0.0}
@@ -5545,6 +5577,10 @@ packages:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
dev: true
+ /fast-diff/1.2.0:
+ resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==}
+ dev: true
+
/fast-glob/3.2.7:
resolution: {integrity: sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==}
engines: {node: '>=8'}
@@ -9215,6 +9251,19 @@ packages:
engines: {node: '>=4'}
dev: true
+ /prettier-linter-helpers/1.0.0:
+ resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==}
+ engines: {node: '>=6.0.0'}
+ dependencies:
+ fast-diff: 1.2.0
+ dev: true
+
+ /prettier/2.5.0:
+ resolution: {integrity: sha512-FM/zAKgWTxj40rH03VxzIPdXmj39SwSjwG0heUcNFwI+EMZJnY93yAiKXM3dObIKAM5TA88werc8T/EwhB45eg==}
+ engines: {node: '>=10.13.0'}
+ hasBin: true
+ dev: true
+
/printf/0.6.1:
resolution: {integrity: sha512-is0ctgGdPJ5951KulgfzvHGwJtZ5ck8l042vRkV6jrkpBzTmb/lueTqguWHy2JfVA+RY6gFVlaZgUS0j7S/dsw==}
engines: {node: '>= 0.9.0'}
diff --git a/strip-data-test-properties-plugin6.js b/strip-data-test-properties-plugin6.js
index b823d095..37781a8d 100644
--- a/strip-data-test-properties-plugin6.js
+++ b/strip-data-test-properties-plugin6.js
@@ -18,11 +18,11 @@ function StripDataTestPropertiesPlugin() {
};
}
-StripDataTestPropertiesPlugin.baseDir = function() {
+StripDataTestPropertiesPlugin.baseDir = function () {
return __dirname;
};
-StripDataTestPropertiesPlugin.cacheKey = function() {
+StripDataTestPropertiesPlugin.cacheKey = function () {
return 'ember-test-selectors.strip-data-test-properties';
};
diff --git a/strip-test-selectors.js b/strip-test-selectors.js
index febfdfbf..d43e8e76 100644
--- a/strip-test-selectors.js
+++ b/strip-test-selectors.js
@@ -8,7 +8,7 @@ function isTestSelector(attribute) {
return TEST_SELECTOR_PREFIX.test(attribute);
}
-module.exports = function() {
+module.exports = function () {
return {
name: 'strip-test-selectors',
@@ -26,14 +26,14 @@ module.exports = function() {
node.params = node.params.filter(param => !isTestSelector(param.original));
node.hash.pairs = node.hash.pairs.filter(pair => !isTestSelector(pair.key));
},
- }
+ },
};
};
-module.exports.baseDir = function() {
+module.exports.baseDir = function () {
return __dirname;
};
-module.exports.cacheKey = function() {
+module.exports.cacheKey = function () {
return 'strip-test-selectors';
};
diff --git a/testem.js b/testem.js
index b59415f2..795bb55a 100644
--- a/testem.js
+++ b/testem.js
@@ -2,12 +2,8 @@
module.exports = {
test_page: 'tests/index.html?hidepassed',
disable_watching: true,
- launch_in_ci: [
- 'Chrome'
- ],
- launch_in_dev: [
- 'Chrome'
- ],
+ launch_in_ci: ['Chrome'],
+ launch_in_dev: ['Chrome'],
browser_start_timeout: 120,
browser_args: {
Chrome: {
@@ -19,8 +15,8 @@ module.exports = {
'--disable-gpu',
'--headless',
'--remote-debugging-port=0',
- '--window-size=1440,900'
- ].filter(Boolean)
- }
- }
+ '--window-size=1440,900',
+ ].filter(Boolean),
+ },
+ },
};
diff --git a/tests/.eslintrc.js b/tests/.eslintrc.js
index 0d98b50e..89041b1a 100644
--- a/tests/.eslintrc.js
+++ b/tests/.eslintrc.js
@@ -1,10 +1,11 @@
module.exports = {
parserOptions: {
sourceType: 'module',
- ecmaVersion: 2017
+ ecmaVersion: 2017,
},
extends: [
'simplabs/configs/ember-qunit',
'simplabs/plugins/qunit',
+ 'plugin:prettier/recommended',
],
};
diff --git a/tests/dummy/app/app.js b/tests/dummy/app/app.js
index b3b2bd67..f08aaaf0 100644
--- a/tests/dummy/app/app.js
+++ b/tests/dummy/app/app.js
@@ -6,7 +6,7 @@ import config from './config/environment';
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
- Resolver
+ Resolver,
});
loadInitializers(App, config.modulePrefix);
diff --git a/tests/dummy/app/components/print-test-attributes.js b/tests/dummy/app/components/print-test-attributes.js
index 88cf761d..e116465c 100644
--- a/tests/dummy/app/components/print-test-attributes.js
+++ b/tests/dummy/app/components/print-test-attributes.js
@@ -3,7 +3,7 @@ import Component from '@ember/component';
const component = Component.extend();
component.reopenClass({
- positionalParams: 'params'
+ positionalParams: 'params',
});
export default component;
diff --git a/tests/dummy/app/router.js b/tests/dummy/app/router.js
index 7a6aeb71..abe25876 100644
--- a/tests/dummy/app/router.js
+++ b/tests/dummy/app/router.js
@@ -3,10 +3,10 @@ import config from './config/environment';
const Router = EmberRouter.extend({
location: config.locationType,
- rootURL: config.rootURL
+ rootURL: config.rootURL,
});
-Router.map(function() {
+Router.map(function () {
this.route('bind-test');
});
diff --git a/tests/dummy/config/environment.js b/tests/dummy/config/environment.js
index 7ffb6855..3bbd8c73 100644
--- a/tests/dummy/config/environment.js
+++ b/tests/dummy/config/environment.js
@@ -2,7 +2,7 @@
/* eslint-env node */
-module.exports = function(environment) {
+module.exports = function (environment) {
let ENV = {
modulePrefix: 'dummy',
environment,
@@ -15,8 +15,8 @@ module.exports = function(environment) {
},
EXTEND_PROTOTYPES: {
// Prevent Ember Data from overriding Date.parse.
- Date: false
- }
+ Date: false,
+ },
},
APP: {
@@ -24,7 +24,7 @@ module.exports = function(environment) {
// when it is created
},
- stripTestSelectors: process.env['STRIP_TEST_SELECTORS']
+ stripTestSelectors: process.env['STRIP_TEST_SELECTORS'],
};
if (environment === 'development') {
diff --git a/tests/dummy/config/targets.js b/tests/dummy/config/targets.js
index 632de0da..326def3e 100644
--- a/tests/dummy/config/targets.js
+++ b/tests/dummy/config/targets.js
@@ -2,11 +2,7 @@
/* eslint-env node */
-const browsers = [
- 'last 1 Chrome versions',
- 'last 1 Firefox versions',
- 'last 1 Safari versions'
-];
+const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';
@@ -16,5 +12,5 @@ if (isCI || isProduction) {
}
module.exports = {
- browsers
+ browsers,
};
diff --git a/tests/integration/strip-data-test-attributes-from-components-test.js b/tests/integration/strip-data-test-attributes-from-components-test.js
index 21939ac7..99c6c310 100644
--- a/tests/integration/strip-data-test-attributes-from-components-test.js
+++ b/tests/integration/strip-data-test-attributes-from-components-test.js
@@ -5,52 +5,58 @@ import hbs from 'htmlbars-inline-precompile';
import config from 'dummy/config/environment';
-module('StripTestSelectorsTransform plugin', function(hooks) {
+module('StripTestSelectorsTransform plugin', function (hooks) {
setupRenderingTest(hooks);
if (config.stripTestSelectors) {
- test('it strips data-test-* attributes from components', async function(assert) {
+ test('it strips data-test-* attributes from components', async function (assert) {
await render(hbs`{{print-test-attributes data-test-first="foobar"}}`);
assert.dom('.data-test-first').hasText('', 'the data-test-first was stripped');
});
- test('it strips data-test-* attributes from components in block form', async function(assert) {
- await render(hbs`{{#print-test-attributes data-test-first="foobar"}}hello{{/print-test-attributes}}`);
+ test('it strips data-test-* attributes from components in block form', async function (assert) {
+ await render(
+ hbs`{{#print-test-attributes data-test-first="foobar"}}hello{{/print-test-attributes}}`
+ );
assert.dom('.data-test-first').hasText('', 'the data-test-first was stripped');
});
- test('it works with multiple data-test-* attributes on components', async function(assert) {
- await render(hbs`{{print-test-attributes data-test-first="foobar" data-test-second="second"}}`);
+ test('it works with multiple data-test-* attributes on components', async function (assert) {
+ await render(
+ hbs`{{print-test-attributes data-test-first="foobar" data-test-second="second"}}`
+ );
assert.dom('.data-test-first').hasText('', 'the data-test-first was stripped');
assert.dom('.data-test-second').hasText('', 'the data-test-second attribute was stripped');
});
- test('it leaves other data attributes untouched, when a data-test-* attribute is present as well on components', async function(assert) {
+ test('it leaves other data attributes untouched, when a data-test-* attribute is present as well on components', async function (assert) {
await render(hbs`{{print-test-attributes data-test-first="foobar" data-non-test="baz"}}`);
assert.dom('.data-test-first').hasText('', 'the data-test-first was stripped');
assert.dom('.data-non-test').hasText('baz', 'the data-non-test attribute was not stripped');
});
- test('it leaves data-test attributes untouched on components', async function(assert) {
+ test('it leaves data-test attributes untouched on components', async function (assert) {
await render(hbs`{{print-test-attributes data-test="foo"}}`);
assert.dom('.data-test').hasText('foo', 'the data-test attribute was stripped');
});
- test('it leaves other data attributes untouched on components', async function(assert) {
+ test('it leaves other data attributes untouched on components', async function (assert) {
await render(hbs`{{print-test-attributes data-non-test="foo"}}`);
assert.dom('.data-non-test').hasText('foo', 'the data-non-test attribute was not stripped');
});
} else {
- test('it does not strip data-test-* attributes from components', async function(assert) {
+ test('it does not strip data-test-* attributes from components', async function (assert) {
await render(hbs`{{print-test-attributes data-test-first="foobar"}}`);
- assert.dom('.data-test-first').hasText('foobar', 'the data-test-first attribute was not stripped');
+ assert
+ .dom('.data-test-first')
+ .hasText('foobar', 'the data-test-first attribute was not stripped');
});
}
});
diff --git a/tests/integration/strip-data-test-attributes-from-tags-test.js b/tests/integration/strip-data-test-attributes-from-tags-test.js
index c780119e..7a3123c0 100644
--- a/tests/integration/strip-data-test-attributes-from-tags-test.js
+++ b/tests/integration/strip-data-test-attributes-from-tags-test.js
@@ -5,19 +5,18 @@ import hbs from 'htmlbars-inline-precompile';
import config from 'dummy/config/environment';
-module('StripTestSelectorsTransform plugin', function(hooks) {
+module('StripTestSelectorsTransform plugin', function (hooks) {
setupRenderingTest(hooks);
if (config.stripTestSelectors) {
-
- test('it strips data-test-* attributes from HTML tags', async function(assert) {
+ test('it strips data-test-* attributes from HTML tags', async function (assert) {
await render(hbs``);
assert.dom('span').exists('the span is present');
assert.dom('span[data-test-id="my-id"]').doesNotExist('data-test-id is stripped');
});
- test('it works with multiple data-test-* attributes on HTML tags', async function(assert) {
+ test('it works with multiple data-test-* attributes on HTML tags', async function (assert) {
await render(hbs``);
assert.dom('span').exists('the span is present');
@@ -25,7 +24,7 @@ module('StripTestSelectorsTransform plugin', function(hooks) {
assert.dom('span[data-test-second="second-id"]').doesNotExist('data-test-second is stripped');
});
- test('it leaves other data attributes untouched, when a data-test-* attribute is present as well on HTML tags', async function(assert) {
+ test('it leaves other data attributes untouched, when a data-test-* attribute is present as well on HTML tags', async function (assert) {
await render(hbs``);
assert.dom('span').exists('the span is present');
@@ -33,28 +32,25 @@ module('StripTestSelectorsTransform plugin', function(hooks) {
assert.dom('span[data-test-id="my-test-id"]').doesNotExist('data-test-id is stripped');
});
- test('it leaves data-test attributes untouched on HTML tags', async function(assert) {
+ test('it leaves data-test attributes untouched on HTML tags', async function (assert) {
await render(hbs``);
assert.dom('span').exists('the span is present');
assert.dom('span[data-test="my-id"]').exists('data-test-id is not stripped');
});
- test('it leaves other data attributes untouched on HTML tags', async function(assert) {
+ test('it leaves other data attributes untouched on HTML tags', async function (assert) {
await render(hbs``);
assert.dom('span').exists('the span is present');
assert.dom('span[data-id="my-id"]').exists('data-id is not stripped');
});
-
} else {
-
- test('it does not strip data-test-* attributes from HTML tags', async function(assert) {
+ test('it does not strip data-test-* attributes from HTML tags', async function (assert) {
await render(hbs``);
assert.dom('span').exists('the span is present');
assert.dom('span[data-test-id="my-id"]').exists('data-test-id is not stripped');
});
-
}
});