fix(compiler): use Object.is() for cache dependency comparison to handle NaN #345
Annotations
10 errors, 1 warning, and 1 notice
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L341
3) [chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: use-memo ─────────────────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -2,11 +2,11 @@
function TestComponent(t0) {
"use memo";
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
@@ -16,11 +16,11 @@
const TestComponent2 = (t0) => {
"use memo";
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: use-memo-output.txt
339 |
340 | expect(output).not.toEqual('');
> 341 | expect(output).toMatchSnapshot(`${t.name}-output.txt`);
| ^
342 | }),
343 | );
344 |
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:341:20
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L341
3) [chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: use-memo ─────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -2,11 +2,11 @@
function TestComponent(t0) {
"use memo";
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
@@ -16,11 +16,11 @@
const TestComponent2 = (t0) => {
"use memo";
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: use-memo-output.txt
339 |
340 | expect(output).not.toEqual('');
> 341 | expect(output).toMatchSnapshot(`${t.name}-output.txt`);
| ^
342 | }),
343 | );
344 |
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:341:20
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L341
2) [chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: module-scope-use-memo ────
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -2,11 +2,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: module-scope-use-memo-output.txt
339 |
340 | expect(output).not.toEqual('');
> 341 | expect(output).toMatchSnapshot(`${t.name}-output.txt`);
| ^
342 | }),
343 | );
344 |
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:341:20
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L341
2) [chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: module-scope-use-memo ────
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -2,11 +2,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: module-scope-use-memo-output.txt
339 |
340 | expect(output).not.toEqual('');
> 341 | expect(output).toMatchSnapshot(`${t.name}-output.txt`);
| ^
342 | }),
343 | );
344 |
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:341:20
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L341
2) [chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: module-scope-use-memo ────
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -2,11 +2,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: module-scope-use-memo-output.txt
339 |
340 | expect(output).not.toEqual('');
> 341 | expect(output).toMatchSnapshot(`${t.name}-output.txt`);
| ^
342 | }),
343 | );
344 |
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:341:20
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L341
2) [chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: module-scope-use-memo ────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -2,11 +2,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: module-scope-use-memo-output.txt
339 |
340 | expect(output).not.toEqual('');
> 341 | expect(output).toMatchSnapshot(`${t.name}-output.txt`);
| ^
342 | }),
343 | );
344 |
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:341:20
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L153
1) [chromium] › __tests__/e2e/page.spec.ts:133:5 › editor should compile from hash successfully ──
Retry #3 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -1,11 +1,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: 01-user-output.txt
151 |
152 | expect(output).not.toEqual('');
> 153 | expect(output).toMatchSnapshot('01-user-output.txt');
| ^
154 | });
155 |
156 | test('reset button works', async ({page}) => {
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:153:18
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L153
1) [chromium] › __tests__/e2e/page.spec.ts:133:5 › editor should compile from hash successfully ──
Retry #2 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -1,11 +1,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: 01-user-output.txt
151 |
152 | expect(output).not.toEqual('');
> 153 | expect(output).toMatchSnapshot('01-user-output.txt');
| ^
154 | });
155 |
156 | test('reset button works', async ({page}) => {
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:153:18
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L153
1) [chromium] › __tests__/e2e/page.spec.ts:133:5 › editor should compile from hash successfully ──
Retry #1 ───────────────────────────────────────────────────────────────────────────────────────
Error: expect(string).toMatchSnapshot(expected) failed
@@ -1,11 +1,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: 01-user-output.txt
151 |
152 | expect(output).not.toEqual('');
> 153 | expect(output).toMatchSnapshot('01-user-output.txt');
| ^
154 | });
155 |
156 | test('reset button works', async ({page}) => {
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:153:18
|
|
compiler/apps/playground/__tests__/e2e/page.spec.ts#L153
1) [chromium] › __tests__/e2e/page.spec.ts:133:5 › editor should compile from hash successfully ──
Error: expect(string).toMatchSnapshot(expected) failed
@@ -1,11 +1,11 @@
import { c as _c } from "react/compiler-runtime";
export default function TestComponent(t0) {
const $ = _c(2);
const { x } = t0;
let t1;
- if ($[0] !== x) {
+ if (!Object.is($[0], x)) {
t1 = <Button>{x}</Button>;
$[0] = x;
$[1] = t1;
} else {
t1 = $[1];
Snapshot: 01-user-output.txt
151 |
152 | expect(output).not.toEqual('');
> 153 | expect(output).toMatchSnapshot('01-user-output.txt');
| ^
154 | });
155 |
156 | test('reset button works', async ({page}) => {
at /home/runner/work/react-mirror/react-mirror/compiler/apps/playground/__tests__/e2e/page.spec.ts:153:18
|
|
|
|
4 failed
[chromium] › __tests__/e2e/page.spec.ts:133:5 › editor should compile from hash successfully ───
[chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: module-scope-use-memo ─────
[chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: use-memo ──────────────────
[chromium] › __tests__/e2e/page.spec.ts:317:7 › playground compiles: parse-flow ────────────────
13 passed (2.5m)
|
The logs for this run have expired and are no longer available.
Loading