ESM modules are always in strict mode, so the "use strict" directive at the top of ported test files is redundant.
The following files currently contain it (all carried over verbatim from upstream CJS sources):
Already merged:
tests/js-native-api/3_callbacks/test.js
tests/js-native-api/4_object_factory/test.js
tests/js-native-api/5_function_factory/test.js
tests/js-native-api/7_factory_wrap/test.js
tests/js-native-api/8_passing_wrapped/test.js
tests/js-native-api/test_array/test.js
tests/js-native-api/test_bigint/test.js
tests/js-native-api/test_date/test.js
tests/js-native-api/test_handle_scope/test.js
tests/js-native-api/test_new_target/test.js
tests/js-native-api/test_number/test.js
tests/js-native-api/test_number/test_null.js
tests/js-native-api/test_promise/test.js
tests/js-native-api/test_properties/test.js
tests/js-native-api/test_reference_double_free/test.js
tests/js-native-api/test_reference_double_free/test_wrap.js
tests/js-native-api/test_symbol/test1.js
tests/js-native-api/test_symbol/test2.js
tests/js-native-api/test_symbol/test3.js
Pending (PRs #38 and #39):
tests/js-native-api/test_conversions/test.js
tests/js-native-api/test_dataview/test.js
Proposed fix
Drop the "use strict" line when porting JS test files, and clean up the existing files above in a single PR. Update the porting skill/contributing docs to note it should be omitted.
ESM modules are always in strict mode, so the
"use strict"directive at the top of ported test files is redundant.The following files currently contain it (all carried over verbatim from upstream CJS sources):
Already merged:
tests/js-native-api/3_callbacks/test.jstests/js-native-api/4_object_factory/test.jstests/js-native-api/5_function_factory/test.jstests/js-native-api/7_factory_wrap/test.jstests/js-native-api/8_passing_wrapped/test.jstests/js-native-api/test_array/test.jstests/js-native-api/test_bigint/test.jstests/js-native-api/test_date/test.jstests/js-native-api/test_handle_scope/test.jstests/js-native-api/test_new_target/test.jstests/js-native-api/test_number/test.jstests/js-native-api/test_number/test_null.jstests/js-native-api/test_promise/test.jstests/js-native-api/test_properties/test.jstests/js-native-api/test_reference_double_free/test.jstests/js-native-api/test_reference_double_free/test_wrap.jstests/js-native-api/test_symbol/test1.jstests/js-native-api/test_symbol/test2.jstests/js-native-api/test_symbol/test3.jsPending (PRs #38 and #39):
tests/js-native-api/test_conversions/test.jstests/js-native-api/test_dataview/test.jsProposed fix
Drop the
"use strict"line when porting JS test files, and clean up the existing files above in a single PR. Update the porting skill/contributing docs to note it should be omitted.