Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
encoding: 'utf8'
}
);
// Ensure the TypeScript config file is written to disk.
expect(writeJSONSpy).toHaveBeenCalledWith(
skyPagesConfigUtil.spaPathTempSrc('tsconfig.json'),
jasmine.objectContaining({
'files': [
'./app/app.module.ts'
]
})
);
mock.stop(f);
});
return npmTranslator.generateDependencyTree(applicationAPath).then((parsedTree) => {
t.deepEqual(parsedTree, applicationATree, "Parsed correctly");
mock.stop("@ui5/logger");
});
});
test.afterEach.always((t) => {
mock.stop("@ui5/logger");
mock.stop("../../../lib/processors/bootstrapHtmlTransformer");
t.context.logWarnSpy.restore();
});
test.afterEach.always((t) => {
mock.stop("@ui5/logger");
t.context.logWarnSpy.restore();
});
afterEach(() => {
mock.stop('hash-file');
mock.stop('fs');
});
afterEach(() => {
mock.stop('../../src/utils')
mock.stop('../../src/config/user')
})
runtime: runtimeUtils.getDefaultRuntime(),
skyux: {
command: 'CUSTOM_COMMAND'
}
};
const config = lib.getWebpackConfig(skyPagesConfig);
config.plugins.forEach(plugin => {
if (plugin.name === 'DefinePlugin') {
const command = JSON.parse(plugin.options.skyPagesConfig).skyux.command;
expect(command).toBe(skyPagesConfig.skyux.command);
}
});
mock.stop(f);
});
runtime: runtimeUtils.getDefaultRuntime({
command: 'CUSTOM_COMMAND'
}),
skyux: {}
};
const config = lib.getWebpackConfig(skyPagesConfig);
config.plugins.forEach(plugin => {
if (plugin.name === 'DefinePlugin') {
const command = JSON.parse(plugin.options.skyPagesConfig.runtime.command);
expect(command).toBe(skyPagesConfig.runtime.command);
}
});
mock.stop(f);
});
called = true;
return {
devServer: {}
};
}
});
function webpackDevServer() {
return {
listen: () => {}
};
}
require('../cli/serve')({}, {}, () => {}, webpackDevServer);
expect(called).toEqual(true);
mock.stop(f);
});