mirror of https://github.com/status-im/metro.git
Remove test for missing feature
Reviewed By: cpojer Differential Revision: D2937175 fb-gh-sync-id: 7c348018918a509e1cd681dfa8df9151b94ce765 shipit-source-id: 7c348018918a509e1cd681dfa8df9151b94ce765
This commit is contained in:
parent
c50043dd15
commit
012caf0e22
|
@ -3718,72 +3718,6 @@ describe('DependencyGraph', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO(davidaurelio) Make this actually worked. The test only passed because
|
|
||||||
// the mocked cache didn't cache. In reality, it didn't work. I tried it.
|
|
||||||
xpit('updates package.json', function() {
|
|
||||||
var root = '/root';
|
|
||||||
var filesystem = fs.__setMockFilesystem({
|
|
||||||
'root': {
|
|
||||||
'index.js': [
|
|
||||||
'/**',
|
|
||||||
' * @providesModule index',
|
|
||||||
' */',
|
|
||||||
'require("aPackage")',
|
|
||||||
].join('\n'),
|
|
||||||
'aPackage': {
|
|
||||||
'package.json': JSON.stringify({
|
|
||||||
name: 'aPackage',
|
|
||||||
main: 'main.js',
|
|
||||||
}),
|
|
||||||
'main.js': 'main',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
var dgraph = new DependencyGraph({
|
|
||||||
...defaults,
|
|
||||||
roots: [root],
|
|
||||||
});
|
|
||||||
return getOrderedDependenciesAsJSON(dgraph, '/root/index.js').then(function() {
|
|
||||||
filesystem.root['index.js'] = filesystem.root['index.js'].replace(/aPackage/, 'bPackage');
|
|
||||||
triggerFileChange('change', 'index.js', root, mockStat);
|
|
||||||
|
|
||||||
filesystem.root.aPackage['package.json'] = JSON.stringify({
|
|
||||||
name: 'bPackage',
|
|
||||||
main: 'main.js',
|
|
||||||
});
|
|
||||||
triggerFileChange('change', 'package.json', '/root/aPackage', mockStat);
|
|
||||||
|
|
||||||
return getOrderedDependenciesAsJSON(dgraph, '/root/index.js').then(function(deps) {
|
|
||||||
expect(deps)
|
|
||||||
.toEqual([
|
|
||||||
{
|
|
||||||
id: 'index',
|
|
||||||
path: '/root/index.js',
|
|
||||||
dependencies: ['bPackage'],
|
|
||||||
isAsset: false,
|
|
||||||
isAsset_DEPRECATED: false,
|
|
||||||
isJSON: false,
|
|
||||||
isPolyfill: false,
|
|
||||||
resolution: undefined,
|
|
||||||
resolveDependency: undefined,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'bPackage/main.js',
|
|
||||||
path: '/root/aPackage/main.js',
|
|
||||||
dependencies: [],
|
|
||||||
isAsset: false,
|
|
||||||
isAsset_DEPRECATED: false,
|
|
||||||
isJSON: false,
|
|
||||||
isPolyfill: false,
|
|
||||||
resolution: undefined,
|
|
||||||
resolveDependency: undefined,
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
pit('changes to browser field', function() {
|
pit('changes to browser field', function() {
|
||||||
var root = '/root';
|
var root = '/root';
|
||||||
var filesystem = fs.__setMockFilesystem({
|
var filesystem = fs.__setMockFilesystem({
|
||||||
|
|
Loading…
Reference in New Issue