Skip to content

Commit

Permalink
test: add comments to new test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
json-derulo committed Dec 27, 2021
1 parent 94c5f6c commit e292506
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/rules/deprecation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ ruleTester.run('deprecation', rule, {
getValidTestCase(`
const component = <Component/>;
`),
// Class method with multiple signatures
getValidTestCase(`
class Class {
method(param: string): void;
Expand All @@ -180,6 +181,9 @@ ruleTester.run('deprecation', rule, {
const obj = new Class();
obj.method('');
`),
// Interface with multiple signatures, extending a class
// This notation used to be mentioned in the TypeScript handbook
// See https://www.typescriptlang.org/docs/handbook/classes.html#using-a-class-as-an-interface
getValidTestCase(`
class Class {}
interface Interface extends Class {
Expand All @@ -189,6 +193,7 @@ ruleTester.run('deprecation', rule, {
const obj: Interface = { method(args: any) {} };
obj.method('');
`),
// Class with multiple method signatures, extending an interface
getValidTestCase(`
interface Interface {}
class Class implements Interface {
Expand Down

0 comments on commit e292506

Please sign in to comment.