Skip to content

Commit e6424d5

Browse files
authored
Move tests next to implementation, and fix filename (#1393)
## Summary: The tests for axis ticks looked lonely hanging out in `__tests__`, so I moved them next to the associated production code. I also renamed one file from `tests.ts` to `test.ts` - the name was preventing Jest from running the tests in that file. Issue: none ## Test plan: `yarn test` Author: benchristel Reviewers: mark-fitzgerald, SonicScrewdriver Required Reviewers: Approved By: mark-fitzgerald Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1393
1 parent 8ae3d18 commit e6424d5

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/ten-paws-wash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@khanacademy/perseus": patch
3+
---
4+
5+
Internal: Move and rename test files

packages/perseus/src/widgets/interactive-graphs/__tests__/axis-tick-labels.tests.ts renamed to packages/perseus/src/widgets/interactive-graphs/axis-tick-labels.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {showTickLabel} from "../graphs/components/axis-tick-labels";
1+
import {showTickLabel} from "./graphs/components/axis-tick-labels";
22

33
it("should hide the first negative axis tick label if the gridStep > tickStep", () => {
44
const gridStep = 2;

packages/perseus/src/widgets/interactive-graphs/__tests__/axis-ticks.test.ts renamed to packages/perseus/src/widgets/interactive-graphs/axis-ticks.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {generateTickLocations} from "../axis-ticks";
1+
import {generateTickLocations} from "./axis-ticks";
22

33
describe("generateTickLocations", () => {
44
it("should generate ticks from the origin", () => {

0 commit comments

Comments
 (0)