Skip to content

Commit

Permalink
fixed test to compare program.description() with colourizedDescription
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdanwan committed Sep 10, 2024
1 parent d44c6f0 commit cb42b27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/unit/commanderProgram.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ describe('commanderProgram.js tests', () => {
test("The program's name, description, and version match what's in package.json", () => {
expect(program.name()).toBe(name);
expect(program.version()).toBe(version);
expect(program.description()).toBe(description);

const colourizedDescription = description.replace(
'gimme_readme',
'\x1b[34mgimme_readme\x1b[0m'
);
expect(program.description()).toBe(colourizedDescription);
});
});

0 comments on commit cb42b27

Please sign in to comment.