-
Notifications
You must be signed in to change notification settings - Fork 47.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Our e2e setup with monaco is kinda brittle since it relies on the dom. It seems like longish text gets truncated so let's just simpify all these test cases.
- Loading branch information
Showing
15 changed files
with
143 additions
and
343 deletions.
There are no files selected for viewing
26 changes: 13 additions & 13 deletions
26
compiler/apps/playground/__tests__/e2e/__snapshots__/page.spec.ts/01-user-output.txt
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,13 +1,13 @@ | ||
function TestComponent(t0) { | ||
const $ = _c(2); | ||
const { x } = t0; | ||
let t1; | ||
if ($[0] !== x) { | ||
t1 = <Button>{x}</Button>; | ||
$[0] = x; | ||
$[1] = t1; | ||
} else { | ||
t1 = $[1]; | ||
} | ||
return t1; | ||
} | ||
function TestComponent(t0) { | ||
const $ = _c(2); | ||
const { x } = t0; | ||
let t1; | ||
if ($[0] !== x) { | ||
t1 = <Button>{x}</Button>; | ||
$[0] = x; | ||
$[1] = t1; | ||
} else { | ||
t1 = $[1]; | ||
} | ||
return t1; | ||
} |
22 changes: 11 additions & 11 deletions
22
compiler/apps/playground/__tests__/e2e/__snapshots__/page.spec.ts/02-default-output.txt
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,11 +1,11 @@ | ||
function MyApp() { | ||
const $ = _c(1); | ||
let t0; | ||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) { | ||
t0 = <div>Hello World</div>; | ||
$[0] = t0; | ||
} else { | ||
t0 = $[0]; | ||
} | ||
return t0; | ||
} | ||
function MyApp() { | ||
const $ = _c(1); | ||
let t0; | ||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) { | ||
t0 = <div>Hello World</div>; | ||
$[0] = t0; | ||
} else { | ||
t0 = $[0]; | ||
} | ||
return t0; | ||
} |
14 changes: 14 additions & 0 deletions
14
...und/__tests__/e2e/__snapshots__/page.spec.ts/function-scope-beats-module-scope-output.txt
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,14 @@ | ||
function TestComponent(t0) { | ||
"use memo"; | ||
const $ = _c(2); | ||
const { x } = t0; | ||
let t1; | ||
if ($[0] !== x) { | ||
t1 = <Button>{x}</Button>; | ||
$[0] = x; | ||
$[1] = t1; | ||
} else { | ||
t1 = $[1]; | ||
} | ||
return t1; | ||
} |
20 changes: 0 additions & 20 deletions
20
...snapshots__/page.spec.ts/function-scope-no-directive-arrow-function-expression-output.txt
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...e/__snapshots__/page.spec.ts/function-scope-use-memo-arrow-function-expression-output.txt
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...__/e2e/__snapshots__/page.spec.ts/function-scope-use-memo-function-declaration-output.txt
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
...e2e/__snapshots__/page.spec.ts/function-scope-use-no-memo-function-declaration-output.txt
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
.../e2e/__snapshots__/page.spec.ts/function-scope-use-no-memo-function-expression-output.txt
This file was deleted.
Oops, something went wrong.
26 changes: 12 additions & 14 deletions
26
...apps/playground/__tests__/e2e/__snapshots__/page.spec.ts/module-scope-use-memo-output.txt
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,15 +1,13 @@ | ||
function anonymous_1() { | ||
const $ = _c(1); | ||
const handleClick = _temp; | ||
let t0; | ||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) { | ||
t0 = <h1 onClick={handleClick}>Welcome to the App!</h1>; | ||
$[0] = t0; | ||
} else { | ||
t0 = $[0]; | ||
} | ||
return t0; | ||
function TestComponent(t0) { | ||
const $ = _c(2); | ||
const { x } = t0; | ||
let t1; | ||
if ($[0] !== x) { | ||
t1 = <Button>{x}</Button>; | ||
$[0] = x; | ||
$[1] = t1; | ||
} else { | ||
t1 = $[1]; | ||
} | ||
return t1; | ||
} | ||
function _temp() { | ||
console.log("Header clicked"); | ||
} |
3 changes: 0 additions & 3 deletions
3
...__/e2e/__snapshots__/page.spec.ts/module-scope-use-no-memo-function-expression-output.txt
This file was deleted.
Oops, something went wrong.
10 changes: 3 additions & 7 deletions
10
...s/playground/__tests__/e2e/__snapshots__/page.spec.ts/module-scope-use-no-memo-output.txt
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,7 +1,3 @@ | ||
function anonymous_1() { | ||
const handleMouseOver = () => { | ||
console.log("Footer hovered"); | ||
}; | ||
return <footer onMouseOver={handleMouseOver}>Footer | ||
Information</footer>; | ||
} | ||
function TestComponent({ x }) { | ||
return <Button>{x}</Button>; | ||
} |
28 changes: 28 additions & 0 deletions
28
compiler/apps/playground/__tests__/e2e/__snapshots__/page.spec.ts/use-memo-output.txt
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,28 @@ | ||
function TestComponent(t0) { | ||
"use memo"; | ||
const $ = _c(2); | ||
const { x } = t0; | ||
let t1; | ||
if ($[0] !== x) { | ||
t1 = <Button>{x}</Button>; | ||
$[0] = x; | ||
$[1] = t1; | ||
} else { | ||
t1 = $[1]; | ||
} | ||
return t1; | ||
} | ||
function anonymous_1(t0) { | ||
"use memo"; | ||
const $ = _c(2); | ||
const { x } = t0; | ||
let t1; | ||
if ($[0] !== x) { | ||
t1 = <Button>{x}</Button>; | ||
$[0] = x; | ||
$[1] = t1; | ||
} else { | ||
t1 = $[1]; | ||
} | ||
return t1; | ||
} |
8 changes: 8 additions & 0 deletions
8
compiler/apps/playground/__tests__/e2e/__snapshots__/page.spec.ts/use-no-memo-output.txt
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 @@ | ||
function anonymous_1() { | ||
"use no memo"; | ||
return <Button>{x}</Button>; | ||
} | ||
function anonymous_3({ x }) { | ||
"use no memo"; | ||
return <Button>{x}</Button>; | ||
} |
Oops, something went wrong.