You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/translator/struct_test.exs
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ defmodule ElixirScript.Translator.Struct.Test do
161
161
end
162
162
163
163
js_code="""
164
-
throw new MyAppError(MyAppError.defexception(message='did not get what was expected'));
164
+
throw MyAppError.defexception(message = 'did not get what was expected');
165
165
"""
166
166
167
167
assert_translation(ex_ast,js_code)
@@ -172,7 +172,9 @@ defmodule ElixirScript.Translator.Struct.Test do
172
172
end
173
173
174
174
js_code="""
175
-
throw new RuntimeError({__struct__: Kernel.SpecialForms.atom('RuntimeError'), message: 'did not get what was expected'});
175
+
throw {
176
+
[Kernel.SpecialForms.atom('__struct__')]: Kernel.SpecialForms.atom('RuntimeError'), [Kernel.SpecialForms.atom('message')]: 'did not get what was expected'
0 commit comments