Skip to content

Commit

Permalink
test: Add test for #91.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Dec 31, 2021
1 parent 4d530f0 commit 8332e6c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/rules/no-exposed-subjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,22 @@ ruleTester({ types: true }).run("no-exposed-subjects", rule, {
}
`
),
fromFixture(
stripIndent`
// https://github.com/cartant/eslint-plugin-rxjs/issues/91
import { Subject } from "rxjs";
class AppComponent {
public foo$: Subject<unknown>;
~~~~ [forbidden { "subject": "foo$" }]
public bar$ = new Subject<unknown>();
~~~~ [forbidden { "subject": "bar$" }]
public getFoo(): Subject<unknown> {
~~~~~~ [forbidden { "subject": "getFoo" }]
return this.foo$;
}
}
`
),
],
});

0 comments on commit 8332e6c

Please sign in to comment.