forked from elastic/elastic-charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(canvas): test text bbox calculator on real canvas (elastic#153)
Removed the jest-canvas-mock package that doesn't use any canvas implementation, substitute the existing test environment with jsdom 14 and updated canvas. Removed an old mock of getContext inside the enzime setup. Increased the scale font size for the bbox calculator and configured few tests for that, to fix the relative issue on chrome. Canvas on node depends on the os, installed library, fonts etc. This commit checks for a maximum difference between the expected value of the measured text of 2px. This commit also revisit the chart_state test suite decoupling each test from each other. fix elastic#152
- Loading branch information
Showing
10 changed files
with
348 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
{ | ||
"roots": [ | ||
"<rootDir>/src" | ||
], | ||
"roots": ["<rootDir>/src"], | ||
"preset": "ts-jest", | ||
"testEnvironment": "jsdom", | ||
"setupFilesAfterEnv": [ | ||
"<rootDir>/scripts/setup_enzyme.ts", | ||
"jest-canvas-mock" | ||
] | ||
} | ||
"testEnvironment": "jest-environment-jsdom-fourteen", | ||
"setupFilesAfterEnv": ["<rootDir>/scripts/setup_enzyme.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.