Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testコマンドで受け取る出力の綺麗なフォーマットが無くなってる #7

Closed
KiichiSugihara opened this issue Jan 25, 2021 · 4 comments

Comments

@KiichiSugihara
Copy link
Owner

KiichiSugihara commented Jan 25, 2021

🐛 不具合概要

#6 (comment)

@KiichiSugihara
Copy link
Owner Author

↓のstdoutを受け取って,console.logで表示のあたり

exec('oj t -c "npx ts-node main.ts"', (err, stdout, stderr) => {
  if (err) {
    console.log(err);
  }
  if (stderr) {
    console.log(stderr);
  }
  if (stdout) {
    console.log("Test Result");
    console.log(stdout);
  }
});

@KiichiSugihara
Copy link
Owner Author

01282b0

streamで受け取って出力に変更

timeなんちゃらのエラー文もなくなった

ただし,フォーマットは表示されない

@KiichiSugihara
Copy link
Owner Author

KiichiSugihara commented Jan 25, 2021

多分,oj独自の強調が表示されなくなったと推測

node側でchalkを利用して表示するのがいいのでは?
https://github.com/chalk/chalk

@KiichiSugihara
Copy link
Owner Author

f87e9cc

ガタガタしてる時あるが良しとする

スクリーンショット 2021-01-25 22 19 09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant