Evacuate part of optimized bundle logic from react code

Reviewed By: lexs

Differential Revision: D3735936

fbshipit-source-id: b38960a8f25be15ccce70296980d78c0a7fa8de5
This commit is contained in:
Michał Gregorczyk
2016-09-06 19:39:29 -07:00
committed by Facebook Github Bot 8
parent 0c2fdf4b6a
commit d3238569bf
3 changed files with 3 additions and 31 deletions

View File

@@ -43,6 +43,7 @@ public class UnpackingJSBundleLoaderTest {
private static final String URL = "http://this.is.an.url";
private static final int MOCK_UNPACKERS_NUM = 2;
private static final int UNPACKER_TEST_FLAGS = 129;
@Rule
public TemporaryFolder folder = new TemporaryFolder();
@@ -111,13 +112,13 @@ public class UnpackingJSBundleLoaderTest {
@Test
public void testSetLoadFlags() throws IOException {
mBuilder.setLoadFlags(UnpackingJSBundleLoader.UNPACKED_JS_SOURCE)
mBuilder.setLoadFlags(UNPACKER_TEST_FLAGS)
.build()
.loadScript(mCatalystInstanceImpl);
verify(mCatalystInstanceImpl).loadScriptFromOptimizedBundle(
eq(mDestinationPath.getPath()),
eq(URL),
eq(UnpackingJSBundleLoader.UNPACKED_JS_SOURCE));
eq(UNPACKER_TEST_FLAGS));
}
@Test