Skip to content

Commit

Permalink
test: fix snapshots and add test ci step
Browse files Browse the repository at this point in the history
  • Loading branch information
adbayb committed Nov 3, 2024
1 parent 5becbf2 commit 55ffe05
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
58 changes: 26 additions & 32 deletions termost/src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,67 +111,67 @@ OPTIONS:
exports[`termost > should handle \`command\` api 2`] = `
"
ℹ️ Information
[34m[34m👋 Hello, I'm the build command[34m[39m
[34m[34m 👋 Hello, I'm the build command[34m[39m

ℹ️ Information
[34m[34m👉 Shared global flag = false[34m[39m
[34m[34m 👉 Shared global flag = false[34m[39m

ℹ️ Information
[34m[34m👉 Local command flag = local-value[34m[39m
[34m[34m 👉 Local command flag = local-value[34m[39m

ℹ️ Information
[34m[34m👉 Context value = {"globalFlag":false,"localFlag":"local-value"}[34m[39m
[34m[34m 👉 Context value = {"globalFlag":false,"localFlag":"local-value"}[34m[39m

ℹ️ Information
[34m[34m👉 Argv value = {"command":"build","operands":[],"options":{}}[34m[39m"
[34m[34m 👉 Argv value = {"command":"build","operands":[],"options":{}}[34m[39m"
`;
exports[`termost > should handle \`command\` api 3`] = `
"
ℹ️ Information
[34m[34m👋 Hello, I'm the watch command[34m[39m
[34m[34m 👋 Hello, I'm the watch command[34m[39m

ℹ️ Information
[34m[34m👉 Shared global flag = false[34m[39m
[34m[34m 👉 Shared global flag = false[34m[39m

ℹ️ Information
[34m[34m👉 Context value = {"globalFlag":false}[34m[39m
[34m[34m 👉 Context value = {"globalFlag":false}[34m[39m

ℹ️ Information
[34m[34m👉 Argv value = {"command":"watch","operands":[],"options":{}}[34m[39m"
[34m[34m 👉 Argv value = {"command":"watch","operands":[],"options":{}}[34m[39m"
`;
exports[`termost > should handle \`command\` api 4`] = `
"
ℹ️ Information
[34m[34m👋 Hello, I'm the build command[34m[39m
[34m[34m 👋 Hello, I'm the build command[34m[39m

ℹ️ Information
[34m[34m👉 Shared global flag = true[34m[39m
[34m[34m 👉 Shared global flag = true[34m[39m

ℹ️ Information
[34m[34m👉 Local command flag = hello[34m[39m
[34m[34m 👉 Local command flag = hello[34m[39m

ℹ️ Information
[34m[34m👉 Context value = {"globalFlag":true,"localFlag":"hello"}[34m[39m
[34m[34m 👉 Context value = {"globalFlag":true,"localFlag":"hello"}[34m[39m

ℹ️ Information
[34m[34m👉 Argv value = {"command":"build","operands":[],"options":{"global":true,"local":"hello"}}[34m[39m"
[34m[34m 👉 Argv value = {"command":"build","operands":[],"options":{"global":true,"local":"hello"}}[34m[39m"
`;
exports[`termost > should handle \`command\` api 5`] = `
"
ℹ️ Information
[34m[34m👋 Hello, I'm the watch command[34m[39m
[34m[34m 👋 Hello, I'm the watch command[34m[39m

ℹ️ Information
[34m[34m👉 Shared global flag = true[34m[39m
[34m[34m 👉 Shared global flag = true[34m[39m

ℹ️ Information
[34m[34m👉 Context value = {"globalFlag":true}[34m[39m
[34m[34m 👉 Context value = {"globalFlag":true}[34m[39m

ℹ️ Information
[34m[34m👉 Argv value = {"command":"watch","operands":[],"options":{"global":true}}[34m[39m"
[34m[34m 👉 Argv value = {"command":"watch","operands":[],"options":{"global":true}}[34m[39m"
`;
exports[`termost > should handle \`command\` api 6`] = `
Expand Down Expand Up @@ -206,7 +206,7 @@ OPTIONS:
exports[`termost > should handle \`option\` api 1`] = `
"
ℹ️ Information
[34m[34m{
[34m[34m {
"optionWithAlias": 0,
"optionWithoutAlias": "defaultValue"
}"
Expand All @@ -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
[34m[34mIf 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).[34m[39m
[34m[34m 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).[34m[39m

ℹ️ Context management
[34m[34mA 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.[34m[39m
[34m[34m 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.[34m[39m

ℹ️ 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
[34m[34mThe \`message\` helpers can be used to display task content in a nice way[34m[39m
[34m[34m The \`message\` helpers can be used to display task content in a nice way[34m[39m

You can also have a total control on the formatting through the \`format\` helper.
{
Expand Down

0 comments on commit 55ffe05

Please sign in to comment.