Skip to content

Commit b29c829

Browse files
authored
chore: run linting in compass package (#3049)
1 parent 6f503ef commit b29c829

File tree

13 files changed

+103
-100
lines changed

13 files changed

+103
-100
lines changed

packages/compass/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"evergreen-expansions": "hadron-build info --format=yaml --flatten > expansions.yml",
142142
"build-info": "hadron-build info",
143143
"jsx": "babel ./src --out-dir ./lib",
144-
"lint": "eslint",
144+
"lint": "eslint .",
145145
"depcheck": "depcheck",
146146
"test-ci": "npm run test-release-tasks",
147147
"test-ci-electron": "npm run test-electron",

packages/compass/release/branch.spec.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {
99
lt
1010
} = require('./branch');
1111

12-
describe('branches', () => {
12+
describe('branches', function() {
1313
if (!!process.env.EVERGREEN && process.platform === 'darwin') {
1414
// These tests are not working well on Evergreen macOS machines and we will
1515
// skip them for now (they will run in GitHub CI)
@@ -18,17 +18,17 @@ describe('branches', () => {
1818
return;
1919
}
2020

21-
describe('isMainBranch', () => {
22-
it('returns true only if branch is main', () => {
21+
describe('isMainBranch', function() {
22+
it('returns true only if branch is main', function() {
2323
expect(isMainBranch('main')).to.be.true;
2424
expect(isMainBranch('beta')).to.be.false;
2525
expect(isMainBranch('release/1.2.33')).to.be.false;
2626
expect(isMainBranch('1.22-releases')).to.be.false;
2727
});
2828
});
2929

30-
describe('isReleaseBranch', () => {
31-
it('returns true only for a release branch', () => {
30+
describe('isReleaseBranch', function() {
31+
it('returns true only for a release branch', function() {
3232
expect(isReleaseBranch('main')).to.be.false;
3333
expect(isReleaseBranch('beta')).to.be.false;
3434
expect(isReleaseBranch('release/1.2.33')).to.be.false;
@@ -37,40 +37,40 @@ describe('branches', () => {
3737
});
3838
});
3939

40-
describe('buildReleaseBranchName', () => {
41-
it('returns a release branch name from version', () => {
40+
describe('buildReleaseBranchName', function() {
41+
it('returns a release branch name from version', function() {
4242
expect(buildReleaseBranchName('1.2')).to.equal('1.2-releases');
4343
});
4444
});
4545

46-
describe('getFirstBeta', () => {
47-
it('throws if not release branch', () => {
46+
describe('getFirstBeta', function() {
47+
it('throws if not release branch', function() {
4848
expect(() => {
4949
getFirstBeta('somebranch');
5050
}).to.throw('not a release branch');
5151
});
5252

53-
it('returns the first beta for a release branch', () => {
53+
it('returns the first beta for a release branch', function() {
5454
expect(getFirstBeta('1.22-releases')).to.equal('1.22.0-beta.0');
5555
expect(getFirstBeta('1.2-releases')).to.equal('1.2.0-beta.0');
5656
});
5757
});
5858

59-
describe('getFirstGa', () => {
60-
it('throws if not release branch', () => {
59+
describe('getFirstGa', function() {
60+
it('throws if not release branch', function() {
6161
expect(() => {
6262
getFirstGa('somebranch');
6363
}).to.throw('not a release branch');
6464
});
6565

66-
it('returns the first beta for a release branch', () => {
66+
it('returns the first beta for a release branch', function() {
6767
expect(getFirstGa('1.22-releases')).to.equal('1.22.0');
6868
expect(getFirstGa('1.2-releases')).to.equal('1.2.0');
6969
});
7070
});
7171

72-
describe('hasVersion', () => {
73-
it('returns true if matching', () => {
72+
describe('hasVersion', function() {
73+
it('returns true if matching', function() {
7474
expect(
7575
hasVersion('1.22-releases', '1.22.0')
7676
).to.be.true;
@@ -84,7 +84,7 @@ describe('branches', () => {
8484
).to.be.true;
8585
});
8686

87-
it('returns false if not matching', () => {
87+
it('returns false if not matching', function() {
8888
expect(
8989
hasVersion('1.22-releases', '1.21.0')
9090
).to.be.false;
@@ -103,8 +103,8 @@ describe('branches', () => {
103103
});
104104
});
105105

106-
describe('lt', () => {
107-
it('returns true only if branch is lower than version', () => {
106+
describe('lt', function() {
107+
it('returns true only if branch is lower than version', function() {
108108
expect(lt('1.22-releases', '1.23.0')).to.be.true;
109109
expect(lt('1.22-releases', '2.0.0')).to.be.true;
110110
expect(lt('1.22-releases', '2.22.0')).to.be.true;

packages/compass/release/bump.spec.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const {
44
newGa
55
} = require('./bump');
66

7-
describe('bump', () => {
7+
describe('bump', function() {
88
if (!!process.env.EVERGREEN && process.platform === 'darwin') {
99
// These tests are not working well on Evergreen macOS machines and we will
1010
// skip them for now (they will run in GitHub CI)
@@ -13,30 +13,30 @@ describe('bump', () => {
1313
return;
1414
}
1515

16-
describe('newBeta', () => {
17-
it('returns new beta for a newly promoted release branch', () => {
16+
describe('newBeta', function() {
17+
it('returns new beta for a newly promoted release branch', function() {
1818
expect(newBeta('1.21.0', '1.22-releases')).to.equal('1.22.0-beta.0');
1919
});
2020

21-
it('bumps beta for a previous beta', () => {
21+
it('bumps beta for a previous beta', function() {
2222
expect(newBeta('1.22.0-beta.0', '1.22-releases')).to.equal('1.22.0-beta.1');
2323
});
2424

25-
it('bumps beta for a previous ga', () => {
25+
it('bumps beta for a previous ga', function() {
2626
expect(newBeta('1.22.0', '1.22-releases')).to.equal('1.22.1-beta.0');
2727
});
2828
});
2929

30-
describe('newGa', () => {
31-
it('returns new ga version for a newly promoted release branch', () => {
30+
describe('newGa', function() {
31+
it('returns new ga version for a newly promoted release branch', function() {
3232
expect(newGa('1.21.0', '1.22-releases')).to.equal('1.22.0');
3333
});
3434

35-
it('bumps beta to new ga', () => {
35+
it('bumps beta to new ga', function() {
3636
expect(newGa('1.22.0-beta.0', '1.22-releases')).to.equal('1.22.0');
3737
});
3838

39-
it('bumps ga to a new ga', () => {
39+
it('bumps ga to a new ga', function() {
4040
expect(newGa('1.22.0', '1.22-releases')).to.equal('1.22.1');
4141
});
4242
});

packages/compass/release/download-center.spec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const CompassDownloadCenter = require('./download-center');
77
chai.use(sinonChai);
88
const { expect } = chai;
99

10-
describe('CompassDownloadCenter', () => {
10+
describe('CompassDownloadCenter', function() {
1111
if (!!process.env.EVERGREEN && process.platform === 'darwin') {
1212
// These tests are not working well on Evergreen macOS machines and we will
1313
// skip them for now (they will run in GitHub CI)
@@ -18,27 +18,27 @@ describe('CompassDownloadCenter', () => {
1818

1919
let downloadCenter;
2020
let config;
21-
beforeEach(async() => {
21+
beforeEach(async function() {
2222
downloadCenter = new CompassDownloadCenter({});
2323
config = await fs.readJSON(
2424
path.resolve(__dirname, 'fixtures', 'config.json')
2525
);
2626
});
2727

28-
describe('getVersion', async() => {
29-
it('gets ga version', () => {
28+
describe('getVersion', function() {
29+
it('gets ga version', function() {
3030
const gaVersion = downloadCenter.getVersion(config, 'ga');
3131
expect(gaVersion).to.equal('1.22.1');
3232
});
3333

34-
it('gets beta version', () => {
34+
it('gets beta version', function() {
3535
const betaVersion = downloadCenter.getVersion(config, 'beta');
3636
expect(betaVersion).to.equal('1.23.0-beta.4');
3737
});
3838
});
3939

40-
describe('getAssets', () => {
41-
it('returns all the assets for ga', () => {
40+
describe('getAssets', function() {
41+
it('returns all the assets for ga', function() {
4242
expect(
4343
downloadCenter.getAssets(config, 'ga')
4444
.map((asset) => path.basename(asset.download_link))
@@ -64,7 +64,7 @@ describe('CompassDownloadCenter', () => {
6464
]);
6565
});
6666

67-
it('returns all the assets for beta', () => {
67+
it('returns all the assets for beta', function() {
6868
expect(
6969
downloadCenter.getAssets(config, 'beta')
7070
.map((asset) => path.basename(asset.download_link))
@@ -91,8 +91,8 @@ describe('CompassDownloadCenter', () => {
9191
});
9292
});
9393

94-
describe('replaceVersion', () => {
95-
it('replaces all stable version with the new one', async() => {
94+
describe('replaceVersion', function() {
95+
it('replaces all stable version with the new one', async function() {
9696
const expected = await fs.readJSON(
9797
path.resolve(__dirname, 'fixtures', 'expected-ga.json')
9898
);
@@ -101,7 +101,7 @@ describe('CompassDownloadCenter', () => {
101101
expect(updated).to.deep.equal(expected);
102102
});
103103

104-
it('replaces all beta versions with the new one', async() => {
104+
it('replaces all beta versions with the new one', async function() {
105105
const expected = await fs.readJSON(
106106
path.resolve(__dirname, 'fixtures', 'expected-beta.json')
107107
);

0 commit comments

Comments
 (0)