-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reliability: Flow types for tests (part 3) #278
Merged
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
fd5fb91
flow types
alshdavid 1371e5b
Changing the underlying type rather than the caller
alshdavid 80aff18
null checks
alshdavid cab6331
comments
alshdavid 9c6b3d6
bundler
alshdavid baf9258
Added @flow to the easy ones
alshdavid abc343c
rimraf
alshdavid f65a1b7
contentHashing
alshdavid 2065560
globals
alshdavid 2662bf9
html
alshdavid 47347aa
html
alshdavid f4f9f68
ci
alshdavid 383e003
assert.fail()
alshdavid 0546cf4
skipping false positive test
alshdavid 2c4f2d5
test
alshdavid 82dfa93
test
alshdavid 74538d4
ci
alshdavid f83dc6d
ci
alshdavid e97604a
Merge branch 'main' into alsh/add-flow-to-tests-3
alshdavid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Missing flow types for node:assert | ||
declare module "assert" { | ||
declare class AssertionError extends Error {} | ||
declare type AssertStrict = { | ||
(value: any, message?: string): void; | ||
ok(value: any, message?: string): void; | ||
fail(message?: string | Error): void; | ||
// deprecated since v10.15 | ||
// fail(actual: any, expected: any, message: string, operator: string): void; | ||
equal(actual: any, expected: any, message?: string): void; | ||
notEqual(actual: any, expected: any, message?: string): void; | ||
deepEqual(actual: any, expected: any, message?: string): void; | ||
notDeepEqual(actual: any, expected: any, message?: string): void; | ||
throws( | ||
block: Function, | ||
error?: Function | RegExp | (err: any) => boolean, | ||
message?: string | ||
): void; | ||
doesNotThrow(block: Function, message?: string): void; | ||
ifError(value: any): void; | ||
AssertionError: typeof AssertionError; | ||
strict: AssertStrict; | ||
... | ||
} | ||
declare module.exports: { | ||
(value: any, message?: string): void, | ||
ok(value: any, message?: string): void, | ||
fail(message?: string | Error): void, | ||
// deprecated since v10.15 | ||
// fail(actual: any, expected: any, message: string, operator: string): void, | ||
equal(actual: any, expected: any, message?: string): void, | ||
notEqual(actual: any, expected: any, message?: string): void, | ||
deepEqual(actual: any, expected: any, message?: string): void, | ||
notDeepEqual(actual: any, expected: any, message?: string): void, | ||
strictEqual(actual: any, expected: any, message?: string): void, | ||
notStrictEqual(actual: any, expected: any, message?: string): void, | ||
deepStrictEqual(actual: any, expected: any, message?: string): void, | ||
notDeepStrictEqual(actual: any, expected: any, message?: string): void, | ||
throws( | ||
block: Function, | ||
error?: Function | RegExp | (err: any) => boolean, | ||
message?: string | ||
): void, | ||
doesNotThrow(block: Function, message?: string): void, | ||
rejects( | ||
block: Function, | ||
error?: Function | RegExp | (err: any) => boolean, | ||
message?: string | ||
): void; | ||
ifError(value: any): void, | ||
AssertionError: typeof AssertionError, | ||
strict: AssertStrict; | ||
... | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @flow | ||
import assert from 'assert'; | ||
import {readFileSync} from 'fs'; | ||
import {join as joinPath} from 'path'; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @flow | ||
import assert from 'assert'; | ||
import path from 'path'; | ||
import zlib from 'zlib'; | ||
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @flow | ||
import assert from 'assert'; | ||
import {join} from 'path'; | ||
import { | ||
|
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
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @flow | ||
import assert from 'assert'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flow types missing for
assert.rejects
andassert.fail
, using override to pass type check