mcfly/packages/cli/test/index.test.js
2024-12-19 23:11:07 +01:00

12 lines
360 B
JavaScript

import { test } from 'vitest'
import { exportedForTest } from '..'
import { expect } from 'vitest'
const testObj = exportedForTest.main
test('should have correct subcommands', () => {
Object.keys(testObj.subCommands).forEach((key) => {
expect(testObj.subCommands[key]).toBeTypeOf('function')
expect(testObj.subCommands[key].name).toBe(key)
})
})