Skip to content

Commit

Permalink
Update date and time format in command test
Browse files Browse the repository at this point in the history
Update the date and time format in the command test to accommodate
different environments.

Generated by gpt-3.5-turbo
  • Loading branch information
joone committed Feb 24, 2024
1 parent 7f71714 commit 1465589
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions test/command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,15 @@ describe("Linux Command Test", () => {
let stdout = execSync(
`MOCHA_ENV=test node ${LOZ_BIN} "Get the current date and time on this system"`
).toString();
expect(stdout).to.match(
/\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} (AM|PM) \w{3} \d{4}/
);
if (GITHUB_ACTIONS === false) {
// Fri Feb 23 10:57:41 PM PST 2024
expect(stdout).to.match(
/\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} (AM|PM) \w{3} \d{4}/
);
} else {
// Sat Feb 24 06:49:11 UTC 2024
expect(stdout).to.match(/\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} UTC \d{4}/);
}
});

// Check available memory
Expand Down

0 comments on commit 1465589

Please sign in to comment.