@@ -7,14 +7,14 @@ function reportResultToServer(result, port) {
7
7
port = port || 8888 ;
8
8
if ( reportResultToServer . reported ) {
9
9
// Only report one result per test, even if the test misbehaves and tries to report more.
10
- reportErrorToServer ( " excessive reported results, sending " + result + " , test will fail" ) ;
10
+ reportErrorToServer ( ` excessive reported results, sending ${ result } , test will fail` ) ;
11
11
}
12
12
reportResultToServer . reported = true ;
13
13
if ( ( typeof ENVIRONMENT_IS_NODE !== 'undefined' && ENVIRONMENT_IS_NODE ) || ( typeof ENVIRONMENT_IS_AUDIO_WORKLET !== 'undefined' && ENVIRONMENT_IS_AUDIO_WORKLET ) ) {
14
- out ( ' RESULT: ' + result ) ;
14
+ out ( ` RESULT: ${ result } ` ) ;
15
15
} else {
16
16
let doFetch = typeof origFetch != 'undefined' ? origFetch : fetch ;
17
- doFetch ( ' http://localhost:' + port + ' /report_result?' + result ) . then ( ( ) => {
17
+ doFetch ( ` http://localhost:${ port } /report_result?${ result } ` ) . then ( ( ) => {
18
18
if ( typeof window === 'object' && window && hasModule && ! Module [ 'pageThrewException' ] ) {
19
19
/* for easy debugging, don't close window on failure */
20
20
window . close ( ) ;
@@ -35,15 +35,15 @@ function reportErrorToServer(message) {
35
35
if ( typeof ENVIRONMENT_IS_NODE !== 'undefined' && ENVIRONMENT_IS_NODE ) {
36
36
err ( message ) ;
37
37
} else {
38
- fetch ( encodeURI ( ' http://localhost:8888?stderr=' + message ) ) ;
38
+ fetch ( encodeURI ( ` http://localhost:8888?stderr=${ message } ` ) ) ;
39
39
}
40
40
}
41
41
42
42
function report_error ( e ) {
43
43
// MINIMAL_RUNTIME doesn't handle exit or call the below onExit handler
44
44
// so we detect the exit by parsing the uncaught exception message.
45
45
var message = e . message || e ;
46
- console . error ( " got top level error: " + message ) ;
46
+ console . error ( ` got top level error: ${ message } ` ) ;
47
47
if ( window . disableErrorReporting ) return ;
48
48
if ( message . includes ( 'unwind' ) ) return ;
49
49
var offset = message . indexOf ( 'exit(' ) ;
@@ -52,10 +52,10 @@ function report_error(e) {
52
52
offset = status . indexOf ( ')' )
53
53
status = status . substr ( 0 , offset )
54
54
console . error ( status ) ;
55
- var result = ' exit:' + status ;
55
+ var result = ` exit:${ status } ` ;
56
56
} else {
57
57
if ( hasModule ) Module [ 'pageThrewException' ] = true ;
58
- result = ' exception:' + message + ' / ' + e . stack ;
58
+ result = ` exception:${ message } / ${ e . stack } ` ;
59
59
}
60
60
// FIXME: Ideally we would just reportResultToServer rather than the `maybe`
61
61
// form but some browser tests currently report exceptions after exit.
@@ -75,7 +75,7 @@ if (hasModule) {
75
75
// If Module['REPORT_EXIT'] is set to false, do not report the result of
76
76
// onExit.
77
77
if ( Module [ 'REPORT_EXIT' ] !== false ) {
78
- maybeReportResultToServer ( ' exit:' + status ) ;
78
+ maybeReportResultToServer ( ` exit:${ status } ` ) ;
79
79
}
80
80
}
81
81
// Force these handlers to be proxied back to the main thread.
@@ -87,7 +87,7 @@ if (hasModule) {
87
87
88
88
if ( ! Module [ 'onAbort' ] ) {
89
89
Module [ 'onAbort' ] = function ( reason ) {
90
- maybeReportResultToServer ( ' abort:' + reason ) ;
90
+ maybeReportResultToServer ( ` abort:${ reason } ` ) ;
91
91
}
92
92
Module [ 'onAbort' ] . proxy = true ;
93
93
}
0 commit comments