Skip to content

Commit 578f859

Browse files
authored
test: add more test cases (#109)
1 parent 538be81 commit 578f859

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/index.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ describe('fanyi CLI', () => {
5656
expect(stdout4).toContain('{"iciba":true}');
5757
});
5858

59+
it('should print without color', async () => {
60+
await runScript(['config', 'set', 'color', 'false']);
61+
const { stdout } = await runScript(['hello']);
62+
expect(stdout).toContain(`hello 英[ hə'ləʊ ] 美[ həˈloʊ ] ~ iciba.com`);
63+
});
64+
5965
it('should print config', async () => {
6066
const { stdout } = await runScript(['config', 'list']);
6167
expect(stdout).toContain('.config/fanyi/.fanyirc');

0 commit comments

Comments
 (0)