strapi/test/startTestApp.js

31 lines
653 B
JavaScript
Raw Normal View History

2019-03-06 19:19:33 +01:00
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();