You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix the tests by modifying current logic:
- stop using ensurePrepareInfo for setting `nativePlatformStatus` property - introduce new method for setting it. The problem with using `ensurePrepareInfo` is that it saves the prepareInfo and calling checkForChanges after that is incorrect in case we modify the `bundle` option. Check test: `Ensures that tns_modules absent when bundling` - the last case was failing because when we call ensurePrepareInfo last time, bundle is false, we overwrite the prepareInfo in the file and checkForChanges says that bundle is currently false and has been false in the previous case.
- in case prepareInfo is missing, we should not call addPlatform again - the else in `ensurePlatformInstalled` is not correct in case we execute `tns platform add <platform>` and then try `tns run/build/prepare <platform>` - in this case we do not have prepareInfo, so we try adding platform again. However, due to current implementation, we are sure that when we do not have prepareInfo, we've called platform add from CLI, so the platform is already added correctly.
- fix a strange if inside `preparePlatformCoreNative` - we must prepare the node_modules in case `--bundle` is passed or the modulesChanged property of `changesInfo` is true.
0 commit comments