strapi/test/startTestApp.js
Alexandre Bodin 865ee5e5e2 Init test automation
wip
2019-03-13 00:10:19 +01:00

31 lines
653 B
JavaScript

const { startTestApp } = require('./helpers/testAppGenerator');
const appName = 'testApp';
const main = async () => {
try {
const { ready, end } = startTestApp({ appName });
await ready;
// stop tests if the testApp stops
await end
.then(() => {
process.stdout.write('testApp exited before the end', () => {
process.exit(1);
});
})
.catch(err => {
console.log(err);
process.stdout.write('testApp exited before the end with error', () => {
process.exit(1);
});
});
} catch (error) {
console.error(error);
process.exit(1);
}
};
main();