node-api,test: use local files for instanceof tests
#60190
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


Make Node-API
instanceoftests independent from V8 code.Currently
test/js-native-api/test_general/testInstanceOf.jstest file depends on two files from the V8 code:deps/v8/test/mjsunit/instanceof.jsdeps/v8/test/mjsunit/instanceof-2.jsWhile it works for the Node.js project, it makes it difficult to reuse these tests for other JS engines and JS runtimes.
In this PR we copy and adapt contents of these two V8 files to
testV8Instanceof.jsandtestV8Instanceof2.jsfiles.These are exactly the same tests as before, but they are now local to the
test/js-native-api/test_generaltest.