Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tue 23 jun #1728

Closed
wants to merge 60 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
5793f5c
[AnimationExperimental] Fixed CATransaction completion block invoke i…
Shuangzuan Jun 16, 2015
0a87579
[Navigator]: Allow developer to observe the focus change events from …
Jun 16, 2015
7dd2dd7
[Docs] Fixed word auto-correction in TextInput.js
prathamesh-sonpatki Jun 16, 2015
477360b
[react-packager] Make it safe to include files without a newline at t…
Jun 16, 2015
a331bb7
[RFC] Add ScrollView bounded height explanation
pcottle Jun 16, 2015
8e07b39
Update promise to 7.0.3
Jun 17, 2015
d83ee3b
Better text background behavior
nicklockwood Jun 17, 2015
1718b17
[ReactNative] Fix extern on RCTProfile.h
tadeuzagallo Jun 17, 2015
6573d25
Improve test architecture so failures don't crash the simulator
nicklockwood Jun 17, 2015
92d9853
[ReactNative] Refactor BatchedBridge and MessageQueue
tadeuzagallo Jun 17, 2015
51e5794
[ActivityIndicator] Specify a width
ide Jun 17, 2015
6e3472d
[react_native] JS files from D2164068: support filtering by mimeType …
foghina Jun 17, 2015
a48e9b4
[WebView] Exposed scalesPageToFit UIWebView property
Jun 17, 2015
a885efe
[ReactNative] Add more markers and fix FPS graph
tadeuzagallo Jun 17, 2015
e78b8c4
[oss][react-native] unbreak NavigationEventEmitter-test
Jun 17, 2015
3fa8ec0
[ReactNative] Change text input underline color
andreicoman11 Jun 17, 2015
3029511
[react_native] JS files from D2163804: [react_native] Add native …
astreet Jun 18, 2015
58d01c7
[RN Inspector] : fix CSS not to use view overflow which is not suppor…
olinotteghem Jun 18, 2015
dc39316
[RN Events] clear disk cache on logout
sahrens Jun 18, 2015
5263b23
Renamed RCTDataManager to RCTNetworking
nicklockwood Jun 18, 2015
7d62b60
[ReactNative] Fix 32 bit check compile error
sahrens Jun 19, 2015
4ddfc14
Fixed stickers
nicklockwood Jun 19, 2015
9998337
[react-packager] Add tests to ensure we return all dependency types
Jun 19, 2015
cf0e40a
[ReactNative] Fix MessageQueue-test on open source
tadeuzagallo Jun 18, 2015
c8c254c
Changed methodQueue to a property
nicklockwood Jun 19, 2015
0116abe
[react_native] JS files from D2164109: [react_native] Fix JS erro…
astreet Jun 19, 2015
6cf570d
[ReactNative] Fix retain cycle on DevMenu
tadeuzagallo Jun 19, 2015
caffd60
[React Native] Update description on RCTText
Jun 19, 2015
634cdfb
Removed duplicate key registration bug
nicklockwood Jun 19, 2015
4d97c01
[ReactNative] Don't activate Chrome when debugger is already open
frantic Jun 19, 2015
080d3b9
[ReactNative] Add PerformanceLogger to measure TTI
tadeuzagallo Jun 19, 2015
0fec355
[react-packager] Cache based on options, not url
Jun 19, 2015
93e98da
[Navigator]: Add a getter to get the current route that is focused fr…
Jun 19, 2015
5c1ac2a
[ReactNative] Block native from becoming js responder
andreicoman11 Jun 19, 2015
2d4055e
[react-packager] Rewrite dependency graph (support node_modules, spee…
Jun 20, 2015
2845e78
[react-packager] Cache in-memory file lookups (~200ms win on file cha…
Jun 20, 2015
5aee4ce
[ReactNative][easy] fix server 500 response typo
Jun 20, 2015
6e568ee
[SampleApp] Remove $(SRCROOT) from INFOPLIST_FILE to fix agvtool
Jun 22, 2015
c9f193c
[ReactNative] Stop build tests on non-test builds
tadeuzagallo Jun 22, 2015
90aad9a
Add support for selecting media from library
dvcrn Jun 22, 2015
2cb0546
Added support for React installed in the application via Cocoapods
potiuk Jun 22, 2015
9228873
[ReactNative] Fix racing conditions on reload
tadeuzagallo Jun 22, 2015
22ea669
[react_native] JS files from D2172754: support setting the cursor pos…
foghina Jun 22, 2015
457fca4
Allow live reload even on errors.
RubenSandwich Jun 22, 2015
eda44ed
Fixed Cmd-R shortcut on iOS 9
nicklockwood Jun 22, 2015
fccea2f
Replace bluebird with promise
Jun 22, 2015
972b546
[Flow] Fix or suppress errors in react-native for Flow v0.13.0
gabelevi Jun 22, 2015
1429b78
[ReactNative] Ignore bad inputs to parseErrorStack
frantic Jun 22, 2015
7f54506
<Navigator />: Fix the getter for `navigationContext`.
Jun 22, 2015
a8011f2
[React Native][Packager] allow --assetRoots to be relative paths
philikon Jun 22, 2015
3d6ffcf
[ReactNative][Profiler] Fix initialize extra call + add popup
tadeuzagallo Jun 22, 2015
5b476d0
[ReactNative] Fix manual ListView loading
sahrens Jun 22, 2015
8663945
Fixed AsyncLocalStorage bug
nicklockwood Jun 22, 2015
d105ae7
[AdsManager] Fix Navigation focus events for logging
Jun 22, 2015
0c38229
[Navigator] Fix overswipe to -1, move guard
Jun 22, 2015
bd3f976
[ReactNative] Fix alert out of main thread
tadeuzagallo Jun 23, 2015
9ed2bd6
Fixed nil safety issue in RKSounds
nicklockwood Jun 23, 2015
1e66e5f
Fixed border bug on events dashboard
nicklockwood Jun 23, 2015
4750856
[ReactNative] resizeMode is not a nativeOnly prop
Jun 23, 2015
cf9afaf
Updates from Tue 23 Jun
vjeux Jun 23, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[react-packager] Add tests to ensure we return all dependency types
Amjad Masad committed Jun 19, 2015
commit 9998337220df0ba41a141530f250c33fab925f16
54 changes: 47 additions & 7 deletions packager/react-packager/src/Packager/__tests__/Packager-test.js
Original file line number Diff line number Diff line change
@@ -23,6 +23,9 @@ describe('Packager', function() {
var getDependencies;
var wrapModule;
var Packager;
var packager;
var assetServer;
var modules;

beforeEach(function() {
getDependencies = jest.genMockFn();
@@ -35,30 +38,27 @@ describe('Packager', function() {
});

Packager = require('../');
});

pit('create a package', function() {
require('fs').statSync.mockImpl(function() {
return {
isDirectory: function() {return true;}
isDirectory: () => true
};
});


require('fs').readFile.mockImpl(function(file, callback) {
callback(null, '{"json":true}');
});

var assetServer = {
assetServer = {
getAssetData: jest.genMockFn(),
};

var packager = new Packager({
packager = new Packager({
projectRoots: ['/root'],
assetServer: assetServer,
});

var modules = [
modules = [
{id: 'foo', path: '/root/foo.js', dependencies: []},
{id: 'bar', path: '/root/bar.js', dependencies: []},
{
@@ -116,7 +116,9 @@ describe('Packager', function() {
type: 'png',
};
});
});

pit('create a package', function() {
return packager.package('/root/foo.js', true, 'source_map_url')
.then(function(p) {
expect(p.addModule.mock.calls[0][0]).toEqual({
@@ -200,4 +202,42 @@ describe('Packager', function() {
]);
});
});

pit('gets the list of dependencies', function() {
return packager.getDependencies('/root/foo.js', true)
.then(({dependencies}) => {
expect(dependencies).toEqual([
{
dependencies: [],
id: 'foo',
path: '/root/foo.js',
},
{
dependencies: [],
id: 'bar',
path: '/root/bar.js',
},
{
dependencies: [],
id: 'image!img',
isAsset_DEPRECATED: true,
path: '/root/img/img.png',
resolution: 2,
},
{
dependencies: [],
id: 'new_image.png',
isAsset: true,
path: '/root/img/new_image.png',
resolution: 2,
},
{
dependencies: [],
id: 'package/file.json',
isJSON: true,
path: '/root/file.json',
},
]);
});
});
});