INNER CODE UNIT · JavaScript
runE2eTestSuite
twilio-labs/function-templates · _helpers/test-suite/index.js:5
async function runE2eTestSuite({ baseDir, env, cypressOptions } = {}) {
const config = await getConfig(
baseDir || process.cwd(),
env || {},
cypressOptions
);
try {
console.log('>>> Start local server');
const localDevServer = await startLocalTestServer(config.serverless);
console.log('>>> Run Cypress Tests');
const result = await runTests(config.cypress);
console.log('>>> Shutdown local server');
localDevServer.close();
if (result.status === 'failed' || result.totalFailed > 0) {
// eslint-disable-next-line no-process-exit
process.exit(1);
}