-
-
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.
chore(): add tests configuration and packages updates
- Loading branch information
1 parent
fb357a6
commit 7a4f077
Showing
23 changed files
with
15,977 additions
and
7,503 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 |
---|---|---|
|
@@ -4,3 +4,4 @@ exclude_paths: | |
- '.vscode/**' | ||
- '.husky/**' | ||
- '**.md' | ||
- '**.json' |
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,4 +1,7 @@ | ||
node_modules/ | ||
.vscode/ | ||
*.md | ||
*.config.* | ||
*.config.* | ||
dist/ | ||
**/*/*.spec.* | ||
jest.config.js |
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,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn lint | ||
yarn test |
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,40 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Debug", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/index.ts", | ||
"runtimeArgs": [ | ||
"-r", | ||
"ts-node/register", | ||
"-r", | ||
"tsconfig-paths/register" | ||
], | ||
"preLaunchTask": "tsc: build - tsconfig.json", | ||
"outFiles": [ | ||
"${workspaceFolder}/**/*.js" | ||
] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Debug Tests: Current File", | ||
"env": { "NODE_OPTIONS": "--experimental-vm-modules" }, | ||
"program": "${workspaceFolder}/node_modules/.bin/jest", | ||
"args": ["${fileBasenameNoExtension}", "--config", "jest.config.js"], | ||
"preLaunchTask": "tsc: build - tsconfig.test.json", | ||
"console": "integratedTerminal", | ||
"windows": { | ||
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | ||
} | ||
} | ||
] | ||
} |
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,13 +1,7 @@ | ||
{ | ||
"github.copilot.enable": { | ||
"*": false, | ||
"yaml": false, | ||
"plaintext": false, | ||
"markdown": false | ||
}, | ||
"typescript.tsdk": "./node_modules/typescript/lib", | ||
"editor.formatOnSave": false, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
} |
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,41 +1,39 @@ | ||
#!/usr/bin/env node | ||
|
||
import { questions, args } from './src/services/index.js' | ||
import { showSpinner, stopSpinner, showMessage } from './src/utils/index.js' | ||
|
||
import { questions, args, logging } from './src/apis/index.js' | ||
;(async () => { | ||
const commandArgs = args.parseArgs(process.argv).parseSync() | ||
|
||
const answers = await questions.start() | ||
const isHappy = await questions.areYouHappy() | ||
|
||
await showSpinner({ text: 'Starting process ...', color: 'blue' }) | ||
await logging.showSpinner({ text: 'Starting process ...', color: 'blue' }) | ||
|
||
if (commandArgs.debug) { | ||
await showMessage({ | ||
await logging.showMessage({ | ||
text: 'Showing a more detailed log', | ||
color: 'yellow', | ||
}) | ||
await showMessage({ | ||
text: JSON.stringify(answers, null, 2), | ||
}) | ||
await logging.showMessage({ | ||
text: isHappy ? 'You are happy!' : 'You are not happy!', | ||
color: 'yellow', | ||
}) | ||
} | ||
|
||
if (answers.isHappy) { | ||
await showMessage({ | ||
if (isHappy) { | ||
await logging.showMessage({ | ||
text: "If you are happy, I'm happy too!", | ||
color: 'green', | ||
clear: true, | ||
}) | ||
} else { | ||
await showMessage({ | ||
text: "Sorry to hear that!", | ||
await logging.showMessage({ | ||
text: 'Sorry to hear that!', | ||
color: 'red', | ||
clear: true, | ||
}) | ||
}) | ||
} | ||
|
||
await showSpinner({ text: 'Finishing process...', color: 'green' }) | ||
await logging.showSpinner({ text: 'Finishing process...', color: 'green' }) | ||
|
||
stopSpinner() | ||
logging.stopSpinner() | ||
})() |
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,4 @@ | ||
/** @type {import('jest').Config} */ | ||
export default { | ||
roots: ['./dist'], // Point to the build directory | ||
} |
Oops, something went wrong.