Skip to content

Commit 7848a5f

Browse files
committed
simplify test case
1 parent 51273b7 commit 7848a5f

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

jscomp/test/gpr_4280_test.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ function string(s) {
2222

2323
}
2424

25-
var React = {
26-
string: string
27-
};
28-
2925
function fn(authState, route) {
3026
var exit = 0;
3127
var onboardingRoute;
@@ -91,6 +87,6 @@ if (fn(/* Unauthenticated */-54822762, /* Invite */-730831383) !== 1) {
9187

9288
exports.u = u;
9389
exports.div = div;
94-
exports.React = React;
90+
exports.string = string;
9591
exports.fn = fn;
9692
/* Not a pure module */

jscomp/test/gpr_4280_test.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,36 @@ let div ~children () =
55
u := 300;
66
Js.log "nonline"
77
done
8-
module React = struct
8+
99
let string (s : string) =
1010
for i = 0 to 1 do
1111
u := 200;
1212
Js.log "no"
1313
done
14-
end
14+
1515
let fn authState route =
1616
match (authState, route) with
1717
| (`Unauthenticated,`Onboarding onboardingRoute)
1818
| (`Unverified _,`Onboarding onboardingRoute) ->
1919
Js.Console.log onboardingRoute;
2020
div
21-
~children:[React.string
21+
~children:[string
2222
"Onboarding"] ();
2323
0
2424
| (`Unauthenticated,`SignIn)|(`Unauthenticated,`SignUp)
2525
|(`Unauthenticated,`Invite)|(`Unauthenticated,`PasswordReset) ->
2626
div
27-
~children:[React.string
27+
~children:[string
2828
"LoggedOut"] ();1
2929

3030
| (`Unverified user,_) ->
3131
Js.Console.log user;
3232
div
33-
~children:[React.string
33+
~children:[string
3434
"VerifyEmail"] ();
3535
2
3636
| (`Unauthenticated,_) ->
3737
div
38-
~children:[React.string
38+
~children:[string
3939
"Redirect"] ();3
4040
;; assert (fn (`Unauthenticated) `Invite = 1 ) (* == 1*)

0 commit comments

Comments
 (0)