mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-19 11:12:36 +02:00
refactor: install eslint-plugin-regexp (#6906)
* refactor: install eslint-plugin-regexp * simplify * simplify * fix
This commit is contained in:
parent
127183e70e
commit
3a4b9b4c30
23 changed files with 145 additions and 83 deletions
|
@ -44,7 +44,7 @@ describe('DefaultSidebarItemsGenerator', () => {
|
|||
expect(sidebarSlice).toEqual([]);
|
||||
expect(consoleWarn).toHaveBeenCalledWith(
|
||||
expect.stringMatching(
|
||||
/.*\[WARNING\].* No docs found in .*\..*: can't auto-generate a sidebar\..*/,
|
||||
/.*\[WARNING\].* No docs found in [^.]*\..*: can't auto-generate a sidebar\..*/,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
|
|
@ -134,12 +134,12 @@ describe('loadSidebars', () => {
|
|||
).rejects.toThrowErrorMatchingInlineSnapshot(`"\\"foo\\" is not allowed"`);
|
||||
expect(consoleWarnMock).toBeCalledWith(
|
||||
expect.stringMatching(
|
||||
/.*\[WARNING].* There are more than one category metadata files for .*foo.*: foo\/_category_.json, foo\/_category_.yml. The behavior is undetermined./,
|
||||
/.*\[WARNING\].* There are more than one category metadata files for .*foo.*: foo\/_category_.json, foo\/_category_.yml. The behavior is undetermined./,
|
||||
),
|
||||
);
|
||||
expect(consoleErrorMock).toBeCalledWith(
|
||||
expect.stringMatching(
|
||||
/.*\[ERROR].* The docs sidebar category metadata file .*foo\/_category_.json.* looks invalid!/,
|
||||
/.*\[ERROR\].* The docs sidebar category metadata file .*foo\/_category_.json.* looks invalid!/,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue