Skip to content

Commit

Permalink
Drop Jest for bun:test
Browse files Browse the repository at this point in the history
  • Loading branch information
jakeboone02 committed Aug 7, 2023
1 parent b1cd142 commit ea559df
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 34 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ jobs:
run: bun run build

- name: Test
run: bun run test --ci
run: bun test

- name: Upload coverage to Codecov
# if: matrix.os == 'ubuntu-latest' && matrix.node == '18.x'
uses: codecov/codecov-action@v1
# TODO: Upload to Codecov once Bun outputs lcov (https://github.com/oven-sh/bun/issues/4015)
# - name: Upload coverage to Codecov
# # if: matrix.os == 'ubuntu-latest' && matrix.node == '18.x'
# uses: codecov/codecov-action@v1
Binary file modified bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[test]
coverage = true
coverageThreshold = 1
15 changes: 0 additions & 15 deletions jest.config.mjs

This file was deleted.

13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,15 @@
"pretty-print": "bunx prettier --write *.{mjs,ts,json} src/*.*"
},
"devDependencies": {
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"@types/web": "^0.0.111",
"bun-types": "^0.7.0",
"@types/node": "^20.4.8",
"@types/web": "^0.0.112",
"bun-types": "^0.7.3",
"gh-pages": "^5.0.0",
"jest": "^29.6.1",
"np": "^8.0.4",
"open": "^9.1.0",
"prettier": "^3.0.0",
"prettier": "^3.0.1",
"prettier-plugin-organize-imports": "^3.2.3",
"ts-jest": "^29.1.1",
"tsup": "^7.1.0",
"tsup": "^7.2.0",
"typedoc": "^0.24.8",
"typescript": "^5.1.6"
},
Expand Down
19 changes: 12 additions & 7 deletions src/numericQuantityTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import type { NumericQuantityOptions, RomanNumeralUnicode } from './types';
const allowTrailingInvalid = true;
const romanNumerals = true;

const noop = () => {};
// This is only executed to meet test coverage requirements until
// https://github.com/oven-sh/bun/issues/4021 is implemented.
noop();

export const numericQuantityTests: Record<
string,
(
Expand All @@ -17,13 +22,13 @@ export const numericQuantityTests: Record<
['NaN 1/4', NaN],
['', NaN],
[' ', NaN],
[{}, NaN],
[() => {}, NaN],
[[], NaN],
[true, NaN],
[undefined, NaN],
[undefined, NaN, null],
] as any,
[{} as any, NaN],
[noop as any, NaN],
[[] as any, NaN],
[true as any, NaN],
[undefined as any, NaN],
[undefined as any, NaN, null as any],
],
'Actual numbers': [
[12, 12],
[1.2, 1.2],
Expand Down

0 comments on commit ea559df

Please sign in to comment.