-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: config TS considering testing and cli environments
- Loading branch information
1 parent
c524969
commit cefd7b7
Showing
10 changed files
with
1,665 additions
and
1,218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"path": "@commitlint/cz-commitlint" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
import { describe, it } from 'vitest' | ||
import { describe, it, expect } from 'vitest' | ||
|
||
import program from '@/bin/program' | ||
import program from '$/program' | ||
// import prompts from 'prompts' | ||
import type { AvailableCommands } from '@/bin/cli' | ||
import type { AvailableCommands } from '$/cli' | ||
|
||
function run(name: AvailableCommands, prompts?: string[]) { | ||
program.parse(['node', 'webui', name]) | ||
console.log(prompts) | ||
} | ||
|
||
describe('CLI testing', () => { | ||
it('copies all components with `use` command', () => { | ||
// prompts.inject(['']) | ||
program.action(() => console.log('It works!')) | ||
program.parse(['node', 'webui', 'use']) | ||
run('use') | ||
expect(2).toBe(2) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "./tsconfig.cli.json", | ||
"include": ["package.json", "env.d.ts", "tests/bin/**/*", "src/bin/**/*"], | ||
"compilerOptions": { | ||
"composite": true, | ||
"tsBuildInfoFile": "../../node_modules/.tmp/tsconfig.vitest.tsbuildinfo", | ||
|
||
"lib": [], | ||
"types": ["node", "jsdom"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters