Skip to content

Commit

Permalink
chore: handle nanoseconds for better comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
thevaibhav-dixit committed Aug 19, 2024
1 parent ae1f7f1 commit 0ed9af6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bats/e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ teardown_file() {
exec_graphql 'transactions' "$variables"
second_ts=$(graphql_output '.data.transactions.nodes[0].createdAt')

[[ $(date -d "$second_ts" +%s) -lt $(date -d "$first_ts" +%s) ]] || exit 1
[[ $(echo "$(date -d "$second_ts" +%s.%N) < $(date -d "$first_ts" +%s.%N)" | bc -l) -eq 1 ]] || exit 1
}

0 comments on commit 0ed9af6

Please sign in to comment.