Skip to content

Commit d833854

Browse files
author
iexitdev
committed
test: improve unit coverage structure
1 parent a10eaa6 commit d833854

46 files changed

Lines changed: 1131 additions & 137 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ npm-debug.*
99
.tmp/
1010
yarn.lock
1111
dist
12+
coverage/
1213
packages/*/dist
1314
apps/expo-showcase/dist
1415
apps/expo-showcase/benchmark-results

package-lock.json

Lines changed: 157 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"@react-native-community/cli": "^20.1.3",
1111
"@types/node": "^25.6.0",
1212
"@types/react": "^19.2.14",
13+
"@vitest/coverage-v8": "^4.1.5",
1314
"eslint": "^9.39.4",
1415
"eslint-plugin-react": "^7.37.5",
1516
"eslint-plugin-react-hooks": "^7.1.1",
@@ -68,6 +69,7 @@
6869
"pack:check": "node scripts/check-package-packs.mjs",
6970
"test": "npm run typecheck && npm run test:unit && npm run test:compat",
7071
"test:unit": "vitest run --exclude \"packages/**/test/compat/**/*.test.ts\"",
72+
"test:coverage": "vitest run --coverage",
7173
"test:compat": "vitest run packages/core/test/compat",
7274
"typecheck": "tsc --noEmit && npm run core:typecheck && npm run svg:typecheck && npm run rn:typecheck",
7375
"core:typecheck": "tsc -p packages/core/tsconfig.json --noEmit && tsc -p packages/core/tsconfig.test.json --noEmit",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
normalizeLegacyPieData,
88
normalizeLegacyProgressData,
99
normalizeLegacyStackedBarData
10-
} from "../src";
10+
} from "../../src";
1111

1212
describe("normalizeCartesianData", () => {
1313
it("normalizes object rows into multiple numeric series", () => {

packages/core/test/bar-geometry.test.ts renamed to packages/core/test/geometry/bar-geometry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
createBandScale,
77
createLinearScale,
88
normalizeCartesianData
9-
} from "../src";
9+
} from "../../src";
1010

1111
const buildNormalized = () =>
1212
normalizeCartesianData({

packages/core/test/contribution-heatmap.test.ts renamed to packages/core/test/geometry/contribution-heatmap.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { describe, expect, it } from "vitest";
33
import {
44
buildContributionHeatmap,
55
normalizeLegacyContributionData
6-
} from "../src";
6+
} from "../../src";
77

88
describe("contribution heatmap geometry", () => {
99
it("maps dates into stable week and weekday cells", () => {

packages/core/test/geometry.test.ts renamed to packages/core/test/geometry/geometry.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
buildLinePath,
66
formatPathNumber,
77
splitDefinedSegments
8-
} from "../src";
9-
import type { GeometryPoint } from "../src";
8+
} from "../../src";
9+
import type { GeometryPoint } from "../../src";
1010

1111
const point = (
1212
index: number,

packages/core/test/line-series-geometry.test.ts renamed to packages/core/test/geometry/line-series-geometry.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import {
66
createPointScale,
77
createTimeScale,
88
normalizeCartesianData
9-
} from "../src";
10-
import type { ChartXValue } from "../src";
9+
} from "../../src";
10+
import type { ChartXValue } from "../../src";
1111

1212
const numericX = (value: ChartXValue): number | undefined => {
1313
return typeof value === "number" ? value : undefined;

0 commit comments

Comments
 (0)