Skip to content
This repository was archived by the owner on Feb 21, 2022. It is now read-only.

Commit a41f161

Browse files
author
Manuel Lopez
committed
[test] adding member expression test for ter-indent
This test also revealed a misspelling in the test helper file.
1 parent 71d3455 commit a41f161

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/test/rules/helper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export function runScript(rule: string, scriptText: string, config: Object, erro
7373
${scriptText}
7474
-------
7575
76-
Found ${failures.length} errors(s):
76+
Found ${failures.length} error(s):
7777
7878
${errorMsgs.join(' ')}
7979
`;

src/test/rules/terIndentRuleTests.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ function expectedErrors(errors: [[number, NumStr, NumStr]], indentType: string =
3030
const rule = 'ter-indent';
3131
const scripts: { valid: IScripts, invalid: IScripts } = {
3232
valid: [
33+
{
34+
code: Lint.Utils.dedent`
35+
this.http.get('/')
36+
.map(res => res.json())`,
37+
options: [2, { MemberExpression: 1 }]
38+
},
3339
{
3440
code: Lint.Utils.dedent`
3541
class MyComponent {

0 commit comments

Comments
 (0)