Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Add JavaScript codegen snapshot test

+50
+21
compiler-core/src/javascript/tests/case.rs
··· 922 922 }"# 923 923 ) 924 924 } 925 + 926 + #[test] 927 + fn directly_matching_case_subject() { 928 + assert_js!( 929 + r#" 930 + pub fn go() { 931 + let x = "ABC" 932 + case True { 933 + True -> { 934 + let x = 79 935 + 0 936 + } 937 + False -> { 938 + let x = True 939 + 0 940 + } 941 + } 942 + x 943 + }"# 944 + ) 945 + }
+29
compiler-core/src/javascript/tests/snapshots/gleam_core__javascript__tests__case__directly_matching_case_subject.snap
··· 1 + --- 2 + source: compiler-core/src/javascript/tests/case.rs 3 + expression: "\npub fn go() {\n let x = \"ABC\"\n case True {\n True -> {\n let x = 79\n 0\n }\n False -> {\n let x = True\n 0\n }\n }\n x\n}" 4 + --- 5 + ----- SOURCE CODE 6 + 7 + pub fn go() { 8 + let x = "ABC" 9 + case True { 10 + True -> { 11 + let x = 79 12 + 0 13 + } 14 + False -> { 15 + let x = True 16 + 0 17 + } 18 + } 19 + x 20 + } 21 + 22 + ----- COMPILED JAVASCRIPT 23 + export function go() { 24 + let x = "ABC"; 25 + let $ = true; 26 + let x$1 = 79; 27 + 0 28 + return x; 29 + }