Skip to content

Commit

Permalink
feat: colored log for each test start
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Feb 6, 2024
1 parent 879ceab commit 424e8f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/synthetic-chain/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { execSync } from 'node:child_process';
import path from 'node:path';
import { parseArgs } from 'node:util';
import chalk from 'chalk';
import {
bakeTarget,
buildProposalSubmissions,
Expand Down Expand Up @@ -101,12 +102,14 @@ switch (cmd) {

if (values.debug) {
const proposal = matchOneProposal(proposals, match!);
console.log(chalk.yellow.bold(`Debugging ${proposal.proposalName}`));
bakeTarget(imageNameForProposal(proposal, 'test').target, values.dry);
debugTestImage(proposal);
// don't bother to delete the test image because there's just one
// and the user probably wants to run it again.
} else {
for (const proposal of proposals) {
console.log(chalk.cyan.bold(`Testing ${proposal.proposalName}`));
const image = imageNameForProposal(proposal, 'test');
bakeTarget(image.target, values.dry);
runTestImage(proposal);
Expand Down
1 change: 1 addition & 0 deletions packages/synthetic-chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dependencies": {
"@endo/zip": "^1.0.0",
"better-sqlite3": "^9.2.2",
"chalk": "^5.3.0",
"execa": "^8.0.1",
"tsx": "^3.12.8",
"typescript": "^5.3.3"
Expand Down
3 changes: 2 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ __metadata:
"@types/node": "npm:^18.11.9"
ava: "npm:^5.3.0"
better-sqlite3: "npm:^9.2.2"
chalk: "npm:^5.3.0"
execa: "npm:^8.0.1"
tsx: "npm:^3.12.8"
typescript: "npm:^5.3.3"
Expand Down Expand Up @@ -571,7 +572,7 @@ __metadata:
languageName: node
linkType: hard

"chalk@npm:^5.2.0":
"chalk@npm:^5.2.0, chalk@npm:^5.3.0":
version: 5.3.0
resolution: "chalk@npm:5.3.0"
checksum: 8297d436b2c0f95801103ff2ef67268d362021b8210daf8ddbe349695333eb3610a71122172ff3b0272f1ef2cf7cc2c41fdaa4715f52e49ffe04c56340feed09
Expand Down

0 comments on commit 424e8f4

Please sign in to comment.