mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
chore(format): apply oxfmt to the math-tags test
`src/lib/__tests__/math-tags.test.ts` was committed unformatted in #1170, so `yarn prettier` rewrote it on every unrelated run and contributors had to remember to revert the churn. The assertion collapses to 153 characters, well under the configured printWidth of 170. No other file under `src/**` or `electron/**` is formatter-dirty. Neither `.oxfmtrc.json` nor the oxfmt version has changed since that commit, so the drift came from a bypassed lint-staged pre-commit hook rather than a config change.
This commit is contained in:
@@ -47,9 +47,7 @@ describe('math-tags', () => {
|
||||
});
|
||||
|
||||
it('does not extract math inside spoilers so spoiler parsing keeps working', () => {
|
||||
expect(splitMathSegments('[spoiler]a [math]x[/math][/spoiler]')).toEqual([
|
||||
{ type: 'text', value: '[spoiler]a [math]x[/math][/spoiler]', start: 0 },
|
||||
]);
|
||||
expect(splitMathSegments('[spoiler]a [math]x[/math][/spoiler]')).toEqual([{ type: 'text', value: '[spoiler]a [math]x[/math][/spoiler]', start: 0 }]);
|
||||
const mixed = splitMathSegments('[spoiler][math]a[/math][/spoiler] [math]b[/math]');
|
||||
expect(mixed.map((segment) => segment.type)).toEqual(['text', 'math']);
|
||||
expect(mixed[1].value).toBe('[math]b[/math]');
|
||||
|
||||
Reference in New Issue
Block a user