Two TODOs marking tests that assert less than they appear to.
verify-prebuilds skips the Info.plist it just found
https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/node-addon-examples/scripts/verify-prebuilds.mts#L66-L70
The verifier walks each framework in the XCFramework and continues past Info.plist without reading it. That file is written by writeFrameworkInfoPlist in packages/host/src/node/prebuilds/apple.ts from the library name and bundle identifier, and a wrong CFBundleExecutable or CFBundleIdentifier is exactly the kind of failure that passes every build step and then fails at load time on device. Parsing it and asserting the executable name matches the library, and the identifier matches what was requested, is a handful of lines given @expo/plist is already a dependency.
"does not touch required JS files" doesn't prove what it claims
https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/src/node/babel-plugin/plugin.test.ts#L129-L141
The test fixture has my-addon.js and asserts the plugin does not emit requireNodeAddon. But with no my-addon.node in the fixture there is nothing for the plugin to have found in the first place — the assertion passes for the wrong reason, and would keep passing even if the plugin's precedence between a .js and a sibling addon were broken. Adding a ./my-addon.node alongside it, as the TODO says, is what makes the test meaningful: with both present, require('./my-addon') must still resolve to the JS file.
Two
TODOs marking tests that assert less than they appear to.verify-prebuildsskips theInfo.plistit just foundhttps://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/node-addon-examples/scripts/verify-prebuilds.mts#L66-L70The verifier walks each framework in the XCFramework and
continues pastInfo.plistwithout reading it. That file is written bywriteFrameworkInfoPlistinpackages/host/src/node/prebuilds/apple.tsfrom the library name and bundle identifier, and a wrongCFBundleExecutableorCFBundleIdentifieris exactly the kind of failure that passes every build step and then fails at load time on device. Parsing it and asserting the executable name matches the library, and the identifier matches what was requested, is a handful of lines given@expo/plistis already a dependency."does not touch required JS files" doesn't prove what it claims
https://github.com/callstackincubator/react-native-node-api/blob/29a527d87fa8cb965b0048b1b4c1cff2b0eab281/packages/host/src/node/babel-plugin/plugin.test.ts#L129-L141The test fixture has
my-addon.jsand asserts the plugin does not emitrequireNodeAddon. But with nomy-addon.nodein the fixture there is nothing for the plugin to have found in the first place — the assertion passes for the wrong reason, and would keep passing even if the plugin's precedence between a.jsand a sibling addon were broken. Adding a./my-addon.nodealongside it, as theTODOsays, is what makes the test meaningful: with both present,require('./my-addon')must still resolve to the JS file.