Skip to content

Commit

Permalink
Merge branch 'main' into fix/ora-dep-missing
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 authored Sep 13, 2024
2 parents d225fc0 + 578f859 commit fee9a2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="center">

# Fanyi
# Fānyì (翻译)

A 🇨🇳 and 🇺🇸🇬🇧 translate tool in your command line, powered by iciba and groq.

Expand Down
6 changes: 6 additions & 0 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ describe('fanyi CLI', () => {
expect(stdout4).toContain('{"iciba":true}');
});

it('should print without color', async () => {
await runScript(['config', 'set', 'color', 'false']);
const { stdout } = await runScript(['hello']);
expect(stdout).toContain(`hello 英[ hə'ləʊ ] 美[ həˈloʊ ] ~ iciba.com`);
});

it('should print config', async () => {
const { stdout } = await runScript(['config', 'list']);
expect(stdout).toContain('.config/fanyi/.fanyirc');
Expand Down

0 comments on commit fee9a2b

Please sign in to comment.