Skip to content

Commit

Permalink
Change color of console.log in the interactive install
Browse files Browse the repository at this point in the history
  • Loading branch information
ryo-ma committed Feb 25, 2023
1 parent 69f1d32 commit 45f09d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 3 additions & 1 deletion libs/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ export class SearchAction {
),
);
for (const resource of catalog.resources) {
console.log(` ${i}.`, resource.name);
console.log(
Colors.yellow(` [${i}]. ${resource.name}`),
);
console.log(
" * Resource URL :",
Colors.green(resource.url == null ? "" : resource.url),
Expand Down
10 changes: 5 additions & 5 deletions tests/libs/actions.search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe("SearchAction", () => {
],
});
assertSpyCall(consoleLogStub, 4, {
args: [" 1.", "name1-1"],
args: [Colors.yellow(" [1]. name1-1")],
});
assertSpyCall(consoleLogStub, 5, {
args: [
Expand Down Expand Up @@ -138,7 +138,7 @@ describe("SearchAction", () => {
],
});
assertSpyCall(consoleLogStub, 14, {
args: [" 2.", "name2-1"],
args: [Colors.yellow(" [2]. name2-1")],
});
assertSpyCall(consoleLogStub, 15, {
args: [
Expand All @@ -165,7 +165,7 @@ describe("SearchAction", () => {
],
});
assertSpyCall(consoleLogStub, 19, {
args: [" 3.", "name2-2"],
args: [Colors.yellow(" [3]. name2-2")],
});
assertSpyCall(consoleLogStub, 20, {
args: [
Expand Down Expand Up @@ -213,7 +213,7 @@ describe("SearchAction", () => {
],
});
assertSpyCall(consoleLogStub, 29, {
args: [" 4.", "name3-1"],
args: [Colors.yellow(" [4]. name3-1")],
});
assertSpyCall(consoleLogStub, 30, {
args: [
Expand Down Expand Up @@ -288,7 +288,7 @@ describe("SearchAction", () => {
],
});
assertSpyCall(consoleLogStub, 4, {
args: [" 1.", "name1-1"],
args: [Colors.yellow(" [1]. name1-1")],
});
assertSpyCall(consoleLogStub, 5, {
args: [
Expand Down

0 comments on commit 45f09d8

Please sign in to comment.