mirror of https://github.com/status-im/metro.git
metro-buck: add script to auto-gen source maps and stacks
Reviewed By: davidaurelio Differential Revision: D7952999 fbshipit-source-id: 267dec03b5b60786355d33856bba46a9e367b275
This commit is contained in:
parent
99598062ef
commit
192e1080ab
|
@ -63,13 +63,6 @@ exports.create = function create(resolve: ResolveFn, load: LoadFn): GraphFn {
|
||||||
skip,
|
skip,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (tasks.length === 0) {
|
|
||||||
log.error('`Graph` called without any entry points');
|
|
||||||
return Promise.reject(
|
|
||||||
new Error('At least one entry point has to be passed.'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
queue.enqueue(...tasks);
|
queue.enqueue(...tasks);
|
||||||
return collect(await queue.result);
|
return collect(await queue.result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,15 +36,6 @@ describe('Graph:', () => {
|
||||||
graph = Graph.create(resolve, load);
|
graph = Graph.create(resolve, load);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('calls back an error when called without any entry point', async () => {
|
|
||||||
expect.assertions(1);
|
|
||||||
try {
|
|
||||||
await graph([], anyPlatform, {log: quiet});
|
|
||||||
} catch (error) {
|
|
||||||
expect(error).toEqual(any(Error));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
it('resolves the entry point with the passed-in `resolve` function', async () => {
|
it('resolves the entry point with the passed-in `resolve` function', async () => {
|
||||||
const entryPoint = '/arbitrary/path';
|
const entryPoint = '/arbitrary/path';
|
||||||
await graph([entryPoint], anyPlatform, noOpts);
|
await graph([entryPoint], anyPlatform, noOpts);
|
||||||
|
|
Loading…
Reference in New Issue