Add test case for `yarn start ` #8159
Comments
|
Thanks @ruturajv, i agree that this would be nice. I think we could write a small node script that executes |
|
Great, I'll try if I can create something on those lines.. |
|
I have a very rudimentary script doing stuff (just console.logging instead of asserting). However it has 1 problem, the Here is the script anyways. Your views @jasonLaster ? const { spawn } = require('child_process');
const http = require('http');
let yarnProc;
function yarnStart(){
yarnProc = spawn('yarn', ['start']);
yarnProc.stdout.on('data', (data) => {
console.log(`stdout: ${data}`);
if(data.indexOf("8000") > 0){
callDebuggerJs();
}
});
yarnProc.on('close', (code) => {
console.log(`child process exited with code ${code}`);
});
}
function callDebuggerJs() {
let req = http.get('http://localhost:8000/assets/build/debugger.js', (resp) => {
let data = '';
// A chunk of data has been recieved.
resp.on('data', (chunk) => {
data += chunk;
});
// The whole response has been received. Print out the result.
resp.on('end', () => {
console.log(`${data.length} bytes downloaded`);
// assert status code is 200
console.log(resp.statusCode);
// kill the process
console.log(yarnProc.kill());
process.exit();
});
}).on("error", (err) => {
console.log("Error: " + err.message);
});
// req.end(e => console.log(e));
}
yarnStart(); |
|
/claim |
|
Thanks for claiming the issue! !!! Please check your email and confirm the invitation Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to |
|
/unclaim |
At times it happens some code gets checked in and build processes or bootstrap processes fail. One of the most frustrating ones could be
yarn start. If a new developer isn't able to do a cleanyarn start, then he/she could lose interest and focus quickly. Long time backnetmonitorused to run withyarn startnow I've got to painfully wait formozilla-centralbuilds.Recently there was some issue with
yarn start, a patch was suggested by @fvsch and it worked.Something like comment out
require("postcss-bidirection")inpostcss.config.jsI was lucky to find fvsch's reply quickly. Instead can we have a test case that runs and then waits for say 10s and figures out that the process of
yarn startis still running or hasn't ended with non0status code.I'm not sure if its correct to file this bug, but would greatly appreciate if something like this is in place.
Thoughts @fvsch @jasonLaster ?
The text was updated successfully, but these errors were encountered: