function createWithMockFetch()

in spec/helpers.js [36:45]


function createWithMockFetch (dir, id, name, cfg, events) {
    const mockFetchDest = path.join(tmpDir, 'mockFetchDest');
    const templateDir = path.dirname(require.resolve('cordova-app-hello-world'));
    const fetchSpy = jasmine.createSpy('fetchSpy')
        .and.callFake(() => Promise.resolve(mockFetchDest));

    fs.copySync(templateDir, mockFetchDest);
    return createWith({ fetch: fetchSpy })(dir, id, name, cfg, events)
        .then(() => fetchSpy);
}