Skip to content

Commit

Permalink
test: upgrade cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JonDotsoy committed Oct 28, 2023
1 parent a83a598 commit cb39ab1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
8 changes: 6 additions & 2 deletions __snapshots__/ndate.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ snapshot[`show help 1`] = `
" +
" [--hour-cycles <h11|h12|h23|h24|none>] [--time-zone <time-zone>] [--local <locale>]
" +
" [--template <template>] [--json] [--utc] [--epoch] [--epoch-ms] [--date <date>]
" [--template <template>] [--json] [--sheet] [--utc] [--epoch] [--epoch-ms]
" +
" [--help] [-j] [-d <date>] [-l <locale>] [-tz <time-zone>] [-z] [-h]
" [--date <date>] [--help] [-j] [-d <date>] [-l <locale>] [-tz <time-zone>]
" +
" [-z] [-h]
"
`;
Expand All @@ -21,6 +23,8 @@ snapshot[`format epoch 1`] = `"1691465938"`;
snapshot[`format epoch ms 1`] = `"1691465938570"`;
snapshot[`format sheet 1`] = `"=DATE(2023;8;7)+TIME(23;38;58)"`;
snapshot[`format template 1`] = `
"epoch:1691465938
" +
Expand Down
21 changes: 21 additions & 0 deletions ndate.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,27 @@ Deno.test("format epoch ms", async (t) => {
})


Deno.test("format sheet", async (t) => {
await assertSnapshot(
t,
new TextDecoder().decode(
await joinUint8ArrayGenerator(
handler([
"-z",
"-d",
"2023-08-08T03:38:58.570Z",
"-l",
"es-cl",
'-tz',
"America/Santiago",
'--sheet'
]),
),
),
);
})


Deno.test("format template", async (t) => {
await assertSnapshot(
t,
Expand Down

0 comments on commit cb39ab1

Please sign in to comment.