diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 22d6874..e3ce7ad 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -94,3 +94,5 @@ jobs: run: pnpm install --frozen-lockfile - name: Check (static analysis including linters, types, and commit message) run: pnpm check + - name: Test + run: pnpm test diff --git a/termost/src/__snapshots__/index.test.ts.snap b/termost/src/__snapshots__/index.test.ts.snap index 8ac1b3f..11b48e9 100644 --- a/termost/src/__snapshots__/index.test.ts.snap +++ b/termost/src/__snapshots__/index.test.ts.snap @@ -111,67 +111,67 @@ OPTIONS: exports[`termost > should handle \`command\` api 2`] = ` " ℹ️ Information -👋 Hello, I'm the build command + 👋 Hello, I'm the build command  ℹ️ Information -👉 Shared global flag = false + 👉 Shared global flag = false  ℹ️ Information -👉 Local command flag = local-value + 👉 Local command flag = local-value  ℹ️ Information -👉 Context value = {"globalFlag":false,"localFlag":"local-value"} + 👉 Context value = {"globalFlag":false,"localFlag":"local-value"}  ℹ️ Information -👉 Argv value = {"command":"build","operands":[],"options":{}}" + 👉 Argv value = {"command":"build","operands":[],"options":{}}" `; exports[`termost > should handle \`command\` api 3`] = ` " ℹ️ Information -👋 Hello, I'm the watch command + 👋 Hello, I'm the watch command  ℹ️ Information -👉 Shared global flag = false + 👉 Shared global flag = false  ℹ️ Information -👉 Context value = {"globalFlag":false} + 👉 Context value = {"globalFlag":false}  ℹ️ Information -👉 Argv value = {"command":"watch","operands":[],"options":{}}" + 👉 Argv value = {"command":"watch","operands":[],"options":{}}" `; exports[`termost > should handle \`command\` api 4`] = ` " ℹ️ Information -👋 Hello, I'm the build command + 👋 Hello, I'm the build command  ℹ️ Information -👉 Shared global flag = true + 👉 Shared global flag = true  ℹ️ Information -👉 Local command flag = hello + 👉 Local command flag = hello  ℹ️ Information -👉 Context value = {"globalFlag":true,"localFlag":"hello"} + 👉 Context value = {"globalFlag":true,"localFlag":"hello"}  ℹ️ Information -👉 Argv value = {"command":"build","operands":[],"options":{"global":true,"local":"hello"}}" + 👉 Argv value = {"command":"build","operands":[],"options":{"global":true,"local":"hello"}}" `; exports[`termost > should handle \`command\` api 5`] = ` " ℹ️ Information -👋 Hello, I'm the watch command + 👋 Hello, I'm the watch command  ℹ️ Information -👉 Shared global flag = true + 👉 Shared global flag = true  ℹ️ Information -👉 Context value = {"globalFlag":true} + 👉 Context value = {"globalFlag":true}  ℹ️ Information -👉 Argv value = {"command":"watch","operands":[],"options":{"global":true}}" + 👉 Argv value = {"command":"watch","operands":[],"options":{"global":true}}" `; exports[`termost > should handle \`command\` api 6`] = ` @@ -206,7 +206,7 @@ OPTIONS: exports[`termost > should handle \`option\` api 1`] = ` " ℹ️ Information -{ + { "optionWithAlias": 0, "optionWithoutAlias": "defaultValue" }" @@ -225,25 +225,19 @@ exports[`termost > should handle \`task\` api 1`] = ` ✔ A task can have a dynamic label generated from contextual values: small  ℹ️ Label & console output -If you don't specify a label, the handler is executed in "live mode" (the output is not hidden by the label and is displayed gradually). + If you don't specify a label, the handler is executed in "live mode" (the output is not hidden by the label and is displayed gradually).  ℹ️ Context management -A task with a specified "key" can be retrieved here. Size = 45. If no "key" was specified the task returned value cannot be persisted across program instructions. + A task with a specified "key" can be retrieved here. Size = 45. If no "key" was specified the task returned value cannot be persisted across program instructions.  ℹ️ Output formatting -The \`message\` helpers can be used to display task content in a nice way - -ℹ️ Information -The \`message\` helpers can be used to display task content in a nice way - -ℹ️ Information -The \`message\` helpers can be used to display task content in a nice way - -ℹ️ Information -The \`message\` helpers can be used to display task content in a nice way + The \`message\` helpers can be used to display task content in a nice way + +✅ Success + The \`message\` helpers can be used to display task content in a nice way  ℹ️ 👋 You can also customize the label -The \`message\` helpers can be used to display task content in a nice way + The \`message\` helpers can be used to display task content in a nice way  You can also have a total control on the formatting through the \`format\` helper. {