Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit f2713a0

Browse files
committed
Merge pull request #84 from AtomLinter/fix-lint-errors
Fix lint errors
2 parents e4c040a + 05485d3 commit f2713a0

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

spec/linter-htmlhint-spec.js

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,42 @@ describe('The htmlhint provider for Linter', () => {
88
beforeEach(() => {
99
atom.workspace.destroyActivePaneItem();
1010
waitsForPromise(() =>
11-
atom.packages.activatePackage('linter-htmlhint').then(() =>
12-
atom.packages.activatePackage('language-html')
13-
)
11+
atom
12+
.packages
13+
.activatePackage('linter-htmlhint')
14+
.then(() => atom.packages.activatePackage('language-html'))
1415
);
1516
});
1617

1718
it('detects invalid coding style in bad.html and report as error', () => {
1819
waitsForPromise(() => {
1920
const bad = path.join(__dirname, 'fixtures', 'bad.html');
20-
return atom.workspace.open(bad).then(editor => lint(editor)).then(messages => {
21-
expect(messages.length).toEqual(1);
21+
return atom
22+
.workspace
23+
.open(bad)
24+
.then(editor => lint(editor))
25+
.then(messages => {
26+
expect(messages.length).toEqual(1);
2227

23-
// test only the first error
24-
expect(messages[0].type).toEqual('error');
25-
expect(messages[0].text).toEqual('Doctype must be declared first.');
26-
expect(messages[0].filePath).toMatch(/.+bad\.html$/);
27-
expect(messages[0].range).toEqual([[0, 0], [0, 13]]);
28-
});
28+
// test only the first error
29+
expect(messages[0].type).toEqual('error');
30+
expect(messages[0].text).toEqual('Doctype must be declared first.');
31+
expect(messages[0].filePath).toMatch(/.+bad\.html$/);
32+
expect(messages[0].range).toEqual([[0, 0], [0, 13]]);
33+
});
2934
});
3035
});
3136

3237
it('finds nothing wrong with a valid file (good.html)', () => {
3338
waitsForPromise(() => {
3439
const good = path.join(__dirname, 'fixtures', 'good.html');
35-
return atom.workspace.open(good).then(editor => lint(editor)).then(messages => {
36-
expect(messages.length).toEqual(0);
37-
});
40+
return atom
41+
.workspace
42+
.open(good)
43+
.then(editor => lint(editor))
44+
.then(messages => {
45+
expect(messages.length).toEqual(0);
46+
});
3847
});
3948
});
4049
});

0 commit comments

Comments
 (0)