Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MinThaMie committed Jul 25, 2024
1 parent 08d6d0e commit b9b1b63
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 87 deletions.
2 changes: 1 addition & 1 deletion app/services/store.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export {default} from 'ember-data/store';
export { default } from 'ember-data/store';
3 changes: 2 additions & 1 deletion lib/content-generator/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

// eslint-disable-next-line n/no-unpublished-require
const StaticSiteJson = require('broccoli-static-site-json');
// eslint-disable-next-line n/no-unpublished-require
const MergeTrees = require('broccoli-merge-trees');

const COMMON_CONFIGS = {
Expand Down
48 changes: 24 additions & 24 deletions tests/acceptance/changes-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,68 @@ module('Acceptance | changes', function (hooks) {

// Check new features in Ember.js
const newFeaturesInEmberJS = findAll(
'[data-test-package="Ember.js"] [data-test-feature]'
'[data-test-package="Ember.js"] [data-test-feature]',
);

assert.strictEqual(
newFeaturesInEmberJS.length,
43,
'We see 43 new features that occurred in Ember.js since version 3.15'
'We see 43 new features that occurred in Ember.js since version 3.15',
);

// Check deprecations in Ember.js
const deprecationsInEmberJS = findAll(
'[data-test-package="Ember.js"] [data-test-deprecation]'
'[data-test-package="Ember.js"] [data-test-deprecation]',
);

assert.strictEqual(
deprecationsInEmberJS.length,
33,
'We see 33 deprecations that occurred in Ember.js since version 3.15'
'We see 33 deprecations that occurred in Ember.js since version 3.15',
);

// Check new features in Ember Data
const newFeaturesInEmberData = findAll(
'[data-test-package="Ember Data"] [data-test-feature]'
'[data-test-package="Ember Data"] [data-test-feature]',
);

assert.strictEqual(
newFeaturesInEmberData.length,
21,
'We see 21 new feature that occurred in Ember Data since version 3.15'
'We see 21 new feature that occurred in Ember Data since version 3.15',
);

// Check deprecations in Ember Data
const deprecationsInEmberData = findAll(
'[data-test-package="Ember Data"] [data-test-deprecation]'
'[data-test-package="Ember Data"] [data-test-deprecation]',
);

assert.strictEqual(
deprecationsInEmberData.length,
18,
'We see 18 deprecations that occurred in Ember Data since version 3.15'
'We see 18 deprecations that occurred in Ember Data since version 3.15',
);

// Check new features in Ember CLI
const newFeaturesInEmberCLI = findAll(
'[data-test-package="Ember CLI"] [data-test-feature]'
'[data-test-package="Ember CLI"] [data-test-feature]',
);

assert.strictEqual(
newFeaturesInEmberCLI.length,
74,
'We see 74 new features that occurred in Ember CLI since version 3.15'
'We see 74 new features that occurred in Ember CLI since version 3.15',
);

// Check deprecations in Ember CLI
const deprecationsInEmberCLI = findAll(
'[data-test-package="Ember CLI"] [data-test-deprecation]'
'[data-test-package="Ember CLI"] [data-test-deprecation]',
);

assert.strictEqual(
deprecationsInEmberCLI.length,
10,
'We see 10 deprecations that occurred in Ember CLI since version 3.15'
'We see 10 deprecations that occurred in Ember CLI since version 3.15',
);
});

Expand All @@ -81,68 +81,68 @@ module('Acceptance | changes', function (hooks) {

// Check new features in Ember.js
const newFeaturesInEmberJS = findAll(
'[data-test-package="Ember.js"] [data-test-feature]'
'[data-test-package="Ember.js"] [data-test-feature]',
);

assert.strictEqual(
newFeaturesInEmberJS.length,
8,
'We see 8 new features that occurred in Ember.js between 2.17 and 3.3'
'We see 8 new features that occurred in Ember.js between 2.17 and 3.3',
);

// Check deprecations in Ember.js
const deprecationsInEmberJS = findAll(
'[data-test-package="Ember.js"] [data-test-deprecation]'
'[data-test-package="Ember.js"] [data-test-deprecation]',
);

assert.strictEqual(
deprecationsInEmberJS.length,
9,
'We see 9 deprecations that occurred in Ember.js between 2.17 and 3.3'
'We see 9 deprecations that occurred in Ember.js between 2.17 and 3.3',
);

// Check new features in Ember Data
const newFeaturesInEmberData = findAll(
'[data-test-package="Ember Data"] [data-test-feature]'
'[data-test-package="Ember Data"] [data-test-feature]',
);

assert.strictEqual(
newFeaturesInEmberData.length,
5,
'We see 5 new features that occurred in Ember Data between 2.17 and 3.3'
'We see 5 new features that occurred in Ember Data between 2.17 and 3.3',
);

// Check deprecations in Ember Data
const deprecationsInEmberData = findAll(
'[data-test-package="Ember Data"] [data-test-deprecation]'
'[data-test-package="Ember Data"] [data-test-deprecation]',
);

assert.strictEqual(
deprecationsInEmberData.length,
1,
'We see 1 deprecation that occurred in Ember Data between 2.17 and 3.3'
'We see 1 deprecation that occurred in Ember Data between 2.17 and 3.3',
);

// Check new features in Ember CLI
const newFeaturesInEmberCLI = findAll(
'[data-test-package="Ember CLI"] [data-test-feature]'
'[data-test-package="Ember CLI"] [data-test-feature]',
);

assert.strictEqual(
newFeaturesInEmberCLI.length,
2,
'We see 2 new features that occurred in Ember CLI between 2.17 and 3.3'
'We see 2 new features that occurred in Ember CLI between 2.17 and 3.3',
);

// Check deprecations in Ember CLI
const deprecationsInEmberCLI = findAll(
'[data-test-package="Ember CLI"] [data-test-deprecation]'
'[data-test-package="Ember CLI"] [data-test-deprecation]',
);

assert.strictEqual(
deprecationsInEmberCLI.length,
1,
'We see 1 deprecation that occurred in Ember CLI between 2.17 and 3.3'
'We see 1 deprecation that occurred in Ember CLI between 2.17 and 3.3',
);
});

Expand Down
30 changes: 15 additions & 15 deletions tests/acceptance/index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module('Acceptance | index', function (hooks) {
assert.strictEqual(
currentURL(),
'/changes?fromVersion=2.17&toVersion=3.3',
'We see the correct URL.'
'We see the correct URL.',
);
});

Expand All @@ -48,16 +48,16 @@ module('Acceptance | index', function (hooks) {

// Check Ember.js
let features = findAll(
'[data-test-package="Ember.js"] [data-test-feature]'
'[data-test-package="Ember.js"] [data-test-feature]',
);
let deprecations = findAll(
'[data-test-package="Ember.js"] [data-test-deprecation]'
'[data-test-package="Ember.js"] [data-test-deprecation]',
);

assert.strictEqual(
features.length,
8,
'We see that 8 features were added to Ember.js between 2.17 and 3.3.'
'We see that 8 features were added to Ember.js between 2.17 and 3.3.',
);

assert.isFeatureCorrect(features[0], {
Expand All @@ -75,7 +75,7 @@ module('Acceptance | index', function (hooks) {
assert.strictEqual(
deprecations.length,
9,
'We see that 9 deprecations were added to Ember.js between 2.17 and 3.3.'
'We see that 9 deprecations were added to Ember.js between 2.17 and 3.3.',
);

assert.isDeprecationCorrect(deprecations[0], {
Expand All @@ -93,13 +93,13 @@ module('Acceptance | index', function (hooks) {
// Check Ember Data
features = findAll('[data-test-package="Ember Data"] [data-test-feature]');
deprecations = findAll(
'[data-test-package="Ember Data"] [data-test-deprecation]'
'[data-test-package="Ember Data"] [data-test-deprecation]',
);

assert.strictEqual(
features.length,
5,
'We see that 5 features were added to Ember Data between 2.17 and 3.3.'
'We see that 5 features were added to Ember Data between 2.17 and 3.3.',
);

assert.isFeatureCorrect(features[0], {
Expand All @@ -117,7 +117,7 @@ module('Acceptance | index', function (hooks) {
assert.strictEqual(
deprecations.length,
1,
'We see that 1 deprecation was added to Ember Data between 2.17 and 3.3.'
'We see that 1 deprecation was added to Ember Data between 2.17 and 3.3.',
);

assert.isDeprecationCorrect(deprecations[0], {
Expand All @@ -135,13 +135,13 @@ module('Acceptance | index', function (hooks) {
// Check Ember CLI
features = findAll('[data-test-package="Ember CLI"] [data-test-feature]');
deprecations = findAll(
'[data-test-package="Ember CLI"] [data-test-deprecation]'
'[data-test-package="Ember CLI"] [data-test-deprecation]',
);

assert.strictEqual(
features.length,
2,
'We see that 2 features were added to Ember CLI between 2.17 and 3.3.'
'We see that 2 features were added to Ember CLI between 2.17 and 3.3.',
);

assert.isFeatureCorrect(features[0], {
Expand All @@ -159,7 +159,7 @@ module('Acceptance | index', function (hooks) {
assert.strictEqual(
deprecations.length,
1,
'We see that 1 deprecation was added to Ember CLI between 2.17 and 3.3.'
'We see that 1 deprecation was added to Ember CLI between 2.17 and 3.3.',
);

assert.isDeprecationCorrect(deprecations[0], {
Expand All @@ -184,22 +184,22 @@ module('Acceptance | index', function (hooks) {

// Check Ember.js
let features = findAll(
'[data-test-package="Ember.js"] [data-test-feature]'
'[data-test-package="Ember.js"] [data-test-feature]',
);
let deprecations = findAll(
'[data-test-package="Ember.js"] [data-test-deprecation]'
'[data-test-package="Ember.js"] [data-test-deprecation]',
);

assert.strictEqual(
features.length,
0,
'We see that 0 features were added to Ember.js between 3.3 and 2.17.'
'We see that 0 features were added to Ember.js between 3.3 and 2.17.',
);

assert.strictEqual(
deprecations.length,
0,
'We see that 0 deprecations were added to Ember.js between 3.3 and 2.17.'
'We see that 0 deprecations were added to Ember.js between 3.3 and 2.17.',
);
});

Expand Down
8 changes: 4 additions & 4 deletions tests/helpers/features-deprecations.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ function setupCustomAssertions(assert) {
.hasAttribute(
'href',
link,
'We see the correct URL for the feature version.'
'We see the correct URL for the feature version.',
)
.hasText(
`(${version})`,
'We see the correct text for the feature version.'
'We see the correct text for the feature version.',
);
};

Expand All @@ -36,11 +36,11 @@ function setupCustomAssertions(assert) {
.hasAttribute(
'href',
link,
'We see the correct URL for the deprecation version.'
'We see the correct URL for the deprecation version.',
)
.hasText(
`(${version})`,
'We see the correct text for the deprecation version.'
'We see the correct text for the deprecation version.',
);
};
}
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/components/cli-update-commands-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ module('Integration | Component | cli-update-commands', function (hooks) {
.dom('[data-test-command="Ember CLI Update"]')
.hasText(
'ember-cli-update --to 3.14',
'We see the correct command for running ember-cli-update.'
'We see the correct command for running ember-cli-update.',
);

assert
.dom('[data-test-command="Run Codemods"]')
.hasText(
'ember-cli-update --run-codemods',
'We see the correct command for running codemods.'
'We see the correct command for running codemods.',
);
});
});
14 changes: 2 additions & 12 deletions tests/integration/components/ember-versions-form-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ module('Integration | Component | ember-versions-form', function (hooks) {
});

test('selecting and changing fromVersion and toVersion', async function (assert) {
assert.expect(2);

this.onSubmit = ({ fromVersion, toVersion }) => {
assert.strictEqual(
fromVersion,
'3.15',
'We get the correct value for fromVersion.'
'We get the correct value for fromVersion.',
);

assert.strictEqual(
toVersion,
'3.18',
'We get the correct value for toVersion.'
'We get the correct value for toVersion.',
);
};

Expand All @@ -59,8 +57,6 @@ module('Integration | Component | ember-versions-form', function (hooks) {
});

test('Submit button should be enabled initially', async function (assert) {
assert.expect(1);

await render(hbs`
<EmberVersionsForm
@onSubmit={{this.onSubmit}}
Expand All @@ -71,8 +67,6 @@ module('Integration | Component | ember-versions-form', function (hooks) {
});

test('Submit button should be enabled when selected fromVersion is less than toVersion', async function (assert) {
assert.expect(1);

await render(hbs`
<EmberVersionsForm
@onSubmit={{this.onSubmit}}
Expand All @@ -85,8 +79,6 @@ module('Integration | Component | ember-versions-form', function (hooks) {
});

test('Submit button should be disabled when selected fromVersion is greater than toVersion', async function (assert) {
assert.expect(1);

await render(hbs`
<EmberVersionsForm
@onSubmit={{this.onSubmit}}
Expand All @@ -99,8 +91,6 @@ module('Integration | Component | ember-versions-form', function (hooks) {
});

test('Submit button should be disabled when selected fromVersion is equal to toVersion', async function (assert) {
assert.expect(1);

await render(hbs`
<EmberVersionsForm
@onSubmit={{this.onSubmit}}
Expand Down
Loading

0 comments on commit b9b1b63

Please sign in to comment.