refactor utils

This commit is contained in:
wancat committed 2024-02-06 09:20:01 +08:00
1 parent 23f9023f8b
commit e91774fe3b
6 files changed
+93 -80

No files matched your search

+5 -2
View File
@@ -1,8 +1,11 @@
import { buildFileCheckCmd } from '../src/commands'
import { buildFileCheckCmd, File } from '../src/commands'
describe('buildFileCheckCmd function', () => {
it('builds the file check command correctly', () => {
const testcases = [
const testcases: {
input: File
output: string[]
}[] = [
{
input: { path: '/etc/passwd', type: 'file' },
output: ['test', '-f', '/etc/passwd'],