From 24be572cf51497adbbb1c0dc97f4c3f2a26adde7 Mon Sep 17 00:00:00 2001 From: Rafael Oleza Date: Tue, 26 Sep 2017 06:50:53 -0700 Subject: [PATCH] Fix integration snapshots + add emails to test Reviewed By: davidaurelio Differential Revision: D5910903 fbshipit-source-id: 2d7d95db99303ce1106203f6146173b0030c4096 --- .../__snapshots__/basic_bundle-test.js.snap | 14 ++++++++++++-- .../__tests__/basic_bundle-test.js | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/packages/metro-bundler/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap b/packages/metro-bundler/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap index b346f0c1..cfc04504 100644 --- a/packages/metro-bundler/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap +++ b/packages/metro-bundler/src/integration_tests/__tests__/__snapshots__/basic_bundle-test.js.snap @@ -80,10 +80,15 @@ function guardedLoadModule(moduleId, module) { } } +var ID_MASK_SHIFT = 16; +var LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT; + function loadModuleImplementation(moduleId, module) { var nativeRequire = global.nativeRequire; if (!module && nativeRequire) { - nativeRequire(moduleId); + var bundleId = moduleId >>> ID_MASK_SHIFT; + var localId = moduleId & LOCAL_ID_MASK; + nativeRequire(localId, bundleId); module = modules[moduleId]; } @@ -353,10 +358,15 @@ function guardedLoadModule(moduleId, module) { } } +var ID_MASK_SHIFT = 16; +var LOCAL_ID_MASK = ~0 >>> ID_MASK_SHIFT; + function loadModuleImplementation(moduleId, module) { var nativeRequire = global.nativeRequire; if (!module && nativeRequire) { - nativeRequire(moduleId); + var bundleId = moduleId >>> ID_MASK_SHIFT; + var localId = moduleId & LOCAL_ID_MASK; + nativeRequire(localId, bundleId); module = modules[moduleId]; } diff --git a/packages/metro-bundler/src/integration_tests/__tests__/basic_bundle-test.js b/packages/metro-bundler/src/integration_tests/__tests__/basic_bundle-test.js index ccdb3fdf..f857043a 100644 --- a/packages/metro-bundler/src/integration_tests/__tests__/basic_bundle-test.js +++ b/packages/metro-bundler/src/integration_tests/__tests__/basic_bundle-test.js @@ -6,6 +6,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * + * @emails oncall+javascript_foundation * @format */