Skip to content

Commit e3d2cf6

Browse files
authored
tweak option (#34)
1 parent 9d81b31 commit e3d2cf6

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/commands/pull.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ type PullOptions = {
1717
conf?: string
1818
output: string
1919
locales?: string
20-
dryRun?: boolean
20+
dryRun: boolean
2121
}
2222

2323
export const command = 'pull'

test/commands/push.test.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,21 @@ afterEach(() => {
3131
// ----------
3232
// test cases
3333

34-
test('--provider: not found', async () => {
35-
// setup mocks
34+
test('require option', async () => {
35+
const push = await import('../../src/commands/push')
36+
const cmd = yargs.command(push)
37+
try {
38+
await new Promise((resolve, reject) => {
39+
cmd.parse(`push`, (err, argv, output) => {
40+
err ? reject(err) : resolve(output)
41+
})
42+
})
43+
} catch (e) {
44+
expect(e).toMatchObject({ name: 'YError' })
45+
}
46+
})
3647

37-
// run
48+
test('--provider: not found', async () => {
3849
const push = await import('../../src/commands/push')
3950
const cmd = yargs.command(push)
4051
await new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)