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

Commit f6550af

Browse files
committed
Update specs for API changes
1 parent e05057c commit f6550af

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const parseError = async (toParse, sourceFilePath) => {
137137
}
138138
messages.push({
139139
severity: 'error',
140-
excerpt: excerpt,
140+
excerpt,
141141
location: { file: filePath, position: range },
142142
});
143143
reResult = re.exec(toParse);

spec/linter-elixirc-spec.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ describe('The elixirc provider for Linter', () => {
2525
waitsForPromise(() =>
2626
atom.workspace.open(errorMode1Path).then(editor => lint(editor)).then((messages) => {
2727
expect(messages.length).toBe(1);
28-
expect(messages[0].type).toBe('Error');
28+
expect(messages[0].severity).toBe('error');
2929
expect(messages[0].html).not.toBeDefined();
30-
expect(messages[0].text).toBe('(ArgumentError) Dangerous is not available');
31-
expect(messages[0].filePath).toBe(errorMode1Path);
32-
expect(messages[0].range).toEqual([[1, 0], [1, 32]]);
30+
expect(messages[0].excerpt).toBe('(ArgumentError) Dangerous is not available');
31+
expect(messages[0].location.file).toBe(errorMode1Path);
32+
expect(messages[0].location.position).toEqual([[1, 0], [1, 32]]);
3333
}),
3434
);
3535
});
@@ -38,11 +38,11 @@ describe('The elixirc provider for Linter', () => {
3838
waitsForPromise(() =>
3939
atom.workspace.open(errorMode2Path).then(editor => lint(editor)).then((messages) => {
4040
expect(messages.length).toBe(1);
41-
expect(messages[0].type).toBe('Error');
41+
expect(messages[0].severity).toBe('error');
4242
expect(messages[0].html).not.toBeDefined();
43-
expect(messages[0].text).toBe('(CompileError) module Usefulness is not loaded and could not be found');
44-
expect(messages[0].filePath).toBe(errorMode2Path);
45-
expect(messages[0].range).toEqual([[3, 2], [3, 20]]);
43+
expect(messages[0].excerpt).toBe('(CompileError) module Usefulness is not loaded and could not be found');
44+
expect(messages[0].location.file).toBe(errorMode2Path);
45+
expect(messages[0].location.position).toEqual([[3, 2], [3, 20]]);
4646
}),
4747
);
4848
});
@@ -51,11 +51,11 @@ describe('The elixirc provider for Linter', () => {
5151
waitsForPromise(() =>
5252
atom.workspace.open(warningPath).then(editor => lint(editor)).then((messages) => {
5353
expect(messages.length).toBe(1);
54-
expect(messages[0].type).toBe('Warning');
54+
expect(messages[0].severity).toBe('warning');
5555
expect(messages[0].html).not.toBeDefined();
56-
expect(messages[0].text).toBe('variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name');
57-
expect(messages[0].filePath).toBe(warningPath);
58-
expect(messages[0].range).toEqual([[9, 5], [9, 16]]);
56+
expect(messages[0].excerpt).toBe('variable "deps" does not exist and is being expanded to "deps()", please use parentheses to remove the ambiguity or change the variable name');
57+
expect(messages[0].location.file).toBe(warningPath);
58+
expect(messages[0].location.position).toEqual([[9, 5], [9, 16]]);
5959
}),
6060
);
6161
});

0 commit comments

Comments
 (0)