Skip to content

Commit 04485c4

Browse files
committed
Change in test files
1 parent fcc1787 commit 04485c4

File tree

3 files changed

+27
-13
lines changed

3 files changed

+27
-13
lines changed

tests/tests/src/reasonReactRouter.mjs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,28 @@ function search() {
7979
function push(path) {
8080
let match = globalThis.history;
8181
let match$1 = globalThis.window;
82-
if (match !== undefined && match$1 !== undefined) {
83-
Primitive_option.valFromOption(match).pushState(null, "", path);
84-
Primitive_option.valFromOption(match$1).dispatchEvent(safeMakeEvent("popstate"));
85-
return;
82+
if (match !== undefined) {
83+
if (match$1 !== undefined) {
84+
Primitive_option.valFromOption(match).pushState(null, "", path);
85+
Primitive_option.valFromOption(match$1).dispatchEvent(safeMakeEvent("popstate"));
86+
return;
87+
} else {
88+
return;
89+
}
8690
}
8791
}
8892

8993
function replace(path) {
9094
let match = globalThis.history;
9195
let match$1 = globalThis.window;
92-
if (match !== undefined && match$1 !== undefined) {
93-
Primitive_option.valFromOption(match).replaceState(null, "", path);
94-
Primitive_option.valFromOption(match$1).dispatchEvent(safeMakeEvent("popstate"));
95-
return;
96+
if (match !== undefined) {
97+
if (match$1 !== undefined) {
98+
Primitive_option.valFromOption(match).replaceState(null, "", path);
99+
Primitive_option.valFromOption(match$1).dispatchEvent(safeMakeEvent("popstate"));
100+
return;
101+
} else {
102+
return;
103+
}
96104
}
97105
}
98106

tests/tests/src/stdlib/Stdlib_IteratorTests.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,13 @@ let asyncResult = {
4848
};
4949

5050
await Stdlib_AsyncIterator.forEach(asyncIterator, v => {
51-
if (v !== undefined && v[0] === "second") {
52-
asyncResult.contents = "second";
53-
return;
51+
if (v !== undefined) {
52+
if (v[0] === "second") {
53+
asyncResult.contents = "second";
54+
return;
55+
} else {
56+
return;
57+
}
5458
}
5559
});
5660

tests/tests/src/ticker.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ function process_quote(ticker_map, new_ticker, new_value) {
182182
let match$1 = match._0;
183183
let match$2 = match$1.lhs.value;
184184
let match$3 = match$1.rhs.value;
185-
let value = match$2 !== undefined && match$3 !== undefined ? (
186-
match$1.op === "PLUS" ? match$2 + match$3 : match$2 - match$3
185+
let value = match$2 !== undefined ? (
186+
match$3 !== undefined ? (
187+
match$1.op === "PLUS" ? match$2 + match$3 : match$2 - match$3
188+
) : undefined
187189
) : undefined;
188190
ticker.value = value;
189191
});

0 commit comments

Comments
 (0)