mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
Adapt the expected error message for node.
This commit is contained in:
parent
3ab57b3804
commit
fa1fd6062b
@ -55,7 +55,13 @@ public class RuntimeErrors {
|
||||
|
||||
@Test
|
||||
public void longReturn() {
|
||||
assertEquals( "TypeError: cannot pass i64 to or from JS", rule.evalWasm( script, "longReturn" ) );
|
||||
String error = rule.evalWasm( script, "longReturn" );
|
||||
int newlineIdx = error.indexOf( '\n' );
|
||||
if( newlineIdx > 0 ) {
|
||||
error = error.substring( 0, newlineIdx );
|
||||
}
|
||||
String expected = script == ScriptEngine.SpiderMonkey ? "TypeError: cannot pass i64 to or from JS" : "TypeError: invalid type";
|
||||
assertEquals( expected, error );
|
||||
}
|
||||
|
||||
static class TestClass {
|
||||
|
Loading…
x
Reference in New Issue
Block a user