function buildCordovaJsTestBundle()

in build-tools/test-build.js [41:65]


function buildCordovaJsTestBundle (bundlePath) {
    const instrumenter = createInstrumenter();

    return build({
        platformName: 'test',
        platformVersion: 'N/A',
        extraModules: collectTestBuildModules(),
        preprocess (f) {
            // Do not instrument our test dummies
            if (f.path.includes('/test/test-platform-modules/')) return f;

            const contents = instrumenter.instrumentSync(f.contents, f.path);
            return Object.assign({}, f, { contents });
        }
    })
        .then(testBundle => {
            const dir = path.dirname(bundlePath);

            if (!fs.existsSync(dir)) {
                fs.mkdirSync(dir, { recursive: true });
            }

            return fsp.writeFile(bundlePath, testBundle, 'utf8');
        });
}