mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
[tests][hir-typer] Add hir-tests fixture
--- Currently, we run type inference passes early in the pipeline and do not check inference output in any tests, test fixtures, or verifier passes. In fact, the only ways to view inferred types are (1) locally add a test fixture with`@only` and inspect console logs or (2) scroll to the relevant section on a playground example. However, inferred types and effects significantly affect the output of later passes (Alias / MutableRange analysis, InferReactiveIdentifiers, etc), and we have already found some bugs due to incorrect inference (e.g. #1274). This PR add the `typer-tests` fixture with the following goals 1. Record relevant current compiler type + effect inference output. 2. Have relatively stable output (with respect to changes in HIR and PrintHIR). - we try to achieve this by annotating the source code.
This commit is contained in:
1 parent
814a21c97b
commit
03f3e541ce
538 files changed
+1
-1
No files matched your search
+1
-1
@@ -33,7 +33,7 @@ const FlowPragmas = [/\/\/\s@flow$/gm, /\*\s@flow$/gm];
|
||||
|
||||
describe("React Forget (HIR version)", () => {
|
||||
generateTestsFromFixtures(
|
||||
path.join(__dirname, "fixtures", "hir"),
|
||||
path.join(__dirname, "fixtures", "compiler"),
|
||||
(input, file, options) => {
|
||||
const matches = input.matchAll(Pragma_RE);
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 538 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user