* Refactor test helpers
* Combine common codes from `parse` and `build`, and dispatch using
`Mode`
* Remove `toNotBuild` and `toNotParse` and use `expect.not`
* Remove `Warning` and instead mock `console.warn`
* Add `expect.toHavePassed` and check whether parse/build succeeded
lazily
* Improve failed test `message`:
- Use color
- Print stack traces(excluding internals)
- Print diff
- Follow jest matcher output style
* Update helpers.js
* Remove toBeTruthy checks
getParsed throws an error if parsing fails.
* Used tagged literals
* Use .toHaveLength
* Use tagged literals
* Use to{Build,Parse}Like where possible
* Remove compareParseTree
* Use snapshot where possible
* Join into one line where <88 chars
* Revert console.warn() to throw an error
Merge `expectToWarn` to `expectKaTeX`, like
`expect.toFailWithParseError`
* Remove call to console.warn from stack traces
* Fix merge errors
* Remove `getTree`
* Move `_getBuilt` into `getBuilt`
* Move default settings and tagging literal support in to `getParsed`
and `getBuilt`
* Remove stack traces clean-up
* Remove `toHavePassed` matcher
* Extract `expected` string construction into `printExpectedResult`
* Automatic mrel/mbin spacing for \boldsymbol
Fix#1154
* Add test
* Add missing mode
* Separate out \boldsymbol support to correct flow types
* Fix ternaries thanks to @ronkok's comment
* Revert package-lock.json
* Add screenshot test
* Add and expose addFontMetrics function
* fix typo
* recreate package.json-lock
* Add setFontMetrics function to change the defualt metricMap - change getFontMetrics to getGlobalMetrics
* use new setFontMetrics on main KaTeX object
* fix package-lock.json error by rebuilding it
* Add appropriate tests
* update the snapshot
* Support \hdashline
Support `\hdashline` from package `arydshln`. This PR acts as a complement to PR #1395.
Similarly to #1395, the dashed line is rendered as `border-bottom-style: dashed;`. That does not exactly match the `dashsegment` and `dashgap` lengths in `arydshln`, but it does render black lines with sharp edges.
* Fixed top line position
* Add screenshots
* Fix lint error
* Fix another lint error
* Deleted HLine screenshots
* Pick up comments
* Support \arraystretch as a macro definition
Also add `expandMacro` and `expandMacroAsText` helpers to `MacroExpander`.
* Remove excess defaulting
* Add test
* Move test helpers into common modules
* helpers.js gets all the helper functions
* setup.js gets the common Jest setup (serializer, expect extensions)
* Exclude test from coverage testing
* @ylemkimon's comments: parsing -> building, settings || defaultSettings
* Default argument for settings
* Fix lint errors
* @ylemklemon's comment: use buildAndSetResult
* Use template literals
* Stop throwing ParseError when throwOnError is false
`render`, `renderToString`, etc. now catch ParseError and render it to the
raw LaTeX (with proper escaping) and a hover title with the error.
Along the way:
* Use new `katex.__renderToDomTree` in katex-spec's `_getBuilt`.
(This was necessary to get the new error handling in `_getBuilt`.)
* Fix jest results which must always be functions, not strings.
* fix lint
* Fix flow error
Leave error type unspecified, as we check it with instanceof.
* Update katex-spec.js