Skip to content

Commit 1cfb8d3

Browse files
committed
refactor: test_now_on_osx_without_perl
The macOS clock test now computes the expected timestamp via the project’s math utilities, which avoids precision issues when Perl is absent
1 parent 8ebc9fc commit 1cfb8d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/unit/clock_test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ function test_now_on_osx_without_perl() {
7979
mock dependencies::has_python mock_false
8080
mock dependencies::has_node mock_false
8181

82-
assert_same "1727708708326957000" "$(clock::now)"
82+
local expected
83+
expected=$(math::calculate "(1727708708 * 1000000000) + (326957 * 1000)")
84+
assert_same "$expected" "$(clock::now)"
8385
}
8486

8587
function test_runtime_in_milliseconds_when_not_empty_time() {

0 commit comments

Comments
 (0)