Skip to content

Commit

Permalink
♻️ Refactor into typescript test
Browse files Browse the repository at this point in the history
  • Loading branch information
segersniels committed Jun 14, 2023
1 parent f72e994 commit fdecd67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
File renamed without changes.
7 changes: 5 additions & 2 deletions test/cli.spec.js → test/cli.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import updateNotifier from 'update-notifier'
import meow from 'meow'
import { describe, expect, it, jest } from '@jest/globals'

import pkg from '../package.json'
import { options } from '../src/cli'
Expand All @@ -16,9 +17,11 @@ describe('cli', () => {
})

it('should match meow with cli information', () => {
meow.mock.calls[0][1].importMeta = 'import.meta.url'
(
(meow as jest.Mock).mock.calls[0][1] as { importMeta: string }
).importMeta = 'import.meta.url'

expect(meow.mock.calls).toMatchSnapshot()
expect((meow as jest.Mock).mock.calls).toMatchSnapshot()
})

it('should call commit command on commit', () => {
Expand Down

0 comments on commit fdecd67

Please sign in to comment.