-
Notifications
You must be signed in to change notification settings - Fork 708
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix validation.notDocumentated signature logic
Resolves #1895
- Loading branch information
Showing
14 changed files
with
192 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Logger, LogLevel } from "../lib/utils"; | ||
import { deepStrictEqual as equal, fail } from "assert"; | ||
|
||
const levelMap: Record<LogLevel, string> = { | ||
[LogLevel.Error]: "error: ", | ||
[LogLevel.Warn]: "warn: ", | ||
[LogLevel.Info]: "info: ", | ||
[LogLevel.Verbose]: "debug: ", | ||
}; | ||
|
||
export class TestLogger extends Logger { | ||
messages: string[] = []; | ||
|
||
expectMessage(message: string) { | ||
const index = this.messages.indexOf(message); | ||
if (index === -1) { | ||
const messages = this.messages.join("\n\t") || "(none logged)"; | ||
fail( | ||
`Expected "${message}" to be logged. The logged messages were:\n\t${messages}` | ||
); | ||
} | ||
this.messages.splice(index, 1); | ||
} | ||
|
||
expectNoOtherMessages() { | ||
equal(this.messages, [], "Expected no other messages to be logged."); | ||
} | ||
|
||
override log(message: string, level: LogLevel): void { | ||
this.messages.push(levelMap[level] + message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class Foo { | ||
/** Comment */ | ||
constructor(); | ||
constructor(x: string); | ||
constructor(x?: string) {} | ||
} | ||
|
||
export class Bar {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** Foo docs */ | ||
export function foo() {} | ||
|
||
export function bar(); | ||
/** Bar docs */ | ||
export function bar(x: string); | ||
export function bar() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters