Skip to content

Commit

Permalink
test(duration): add reg expression for checking expect
Browse files Browse the repository at this point in the history
  • Loading branch information
PunGrumpy committed Jan 26, 2024
1 parent f97eae3 commit 7e4489d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# os: [ubuntu-latest, macos-latest] # TODO: #16
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest] # TODO: #16
# os: [ubuntu-latest]
node-version: [21]
name: 🧪 Test
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion test/utils/duration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe('Duration String', () => {
const beforeTime = process.hrtime.bigint() - BigInt(String(nanoseconds))
const result = durationString(beforeTime)

expect(result).toMatch(String(unit))
expect(result).toMatch(new RegExp(`\\d+${unit}`))

Check failure on line 33 in test/utils/duration.test.ts

View workflow job for this annotation

GitHub Actions / 🧪 Test (ubuntu-latest, 21)

error: expect(received).toMatch(expected)

Expected substring or pattern: /\d+ns/ s " at /home/runner/work/logixlysia/logixlysia/test/utils/duration.test.ts:33:7

Check failure on line 33 in test/utils/duration.test.ts

View workflow job for this annotation

GitHub Actions / 🧪 Test (macos-latest, 21)

error: expect(received).toMatch(expected)

Expected substring or pattern: /\d+ns/ s " at /Users/runner/work/logixlysia/logixlysia/test/utils/duration.test.ts:33:7
})
}
})

0 comments on commit 7e4489d

Please sign in to comment.