mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-13 06:48:08 +02:00
chore: disable string escaping in snapshots (#7131)
This commit is contained in:
parent
4134ebb3fb
commit
9145ae88cc
60 changed files with 1881 additions and 1884 deletions
File diff suppressed because one or more lines are too long
|
@ -1,5 +1,5 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`validateOptions throws Error in case of invalid feed type 1`] = `"\\"feedOptions.type\\" does not match any of the allowed types"`;
|
||||
exports[`validateOptions throws Error in case of invalid feed type 1`] = `""feedOptions.type" does not match any of the allowed types"`;
|
||||
|
||||
exports[`validateOptions throws Error in case of invalid options 1`] = `"\\"postsPerPage\\" must be greater than or equal to 1"`;
|
||||
exports[`validateOptions throws Error in case of invalid options 1`] = `""postsPerPage" must be greater than or equal to 1"`;
|
||||
|
|
|
@ -200,13 +200,14 @@ describe('getBlogPostAuthors', () => {
|
|||
frontMatter: {
|
||||
authors: 'slorber',
|
||||
},
|
||||
|
||||
authorsMap: {
|
||||
yangshun: {name: 'Yangshun Tay'},
|
||||
jmarcey: {name: 'Joel Marcey'},
|
||||
},
|
||||
}),
|
||||
).toThrowErrorMatchingInlineSnapshot(`
|
||||
"Blog author with key \\"slorber\\" not found in the authors map file.
|
||||
"Blog author with key "slorber" not found in the authors map file.
|
||||
Valid author keys are:
|
||||
- yangshun
|
||||
- jmarcey"
|
||||
|
@ -219,13 +220,14 @@ describe('getBlogPostAuthors', () => {
|
|||
frontMatter: {
|
||||
authors: ['yangshun', 'jmarcey', 'slorber'],
|
||||
},
|
||||
|
||||
authorsMap: {
|
||||
yangshun: {name: 'Yangshun Tay'},
|
||||
jmarcey: {name: 'Joel Marcey'},
|
||||
},
|
||||
}),
|
||||
).toThrowErrorMatchingInlineSnapshot(`
|
||||
"Blog author with key \\"slorber\\" not found in the authors map file.
|
||||
"Blog author with key "slorber" not found in the authors map file.
|
||||
Valid author keys are:
|
||||
- yangshun
|
||||
- jmarcey"
|
||||
|
@ -238,13 +240,14 @@ describe('getBlogPostAuthors', () => {
|
|||
frontMatter: {
|
||||
authors: [{key: 'yangshun'}, {key: 'jmarcey'}, {key: 'slorber'}],
|
||||
},
|
||||
|
||||
authorsMap: {
|
||||
yangshun: {name: 'Yangshun Tay'},
|
||||
jmarcey: {name: 'Joel Marcey'},
|
||||
},
|
||||
}),
|
||||
).toThrowErrorMatchingInlineSnapshot(`
|
||||
"Blog author with key \\"slorber\\" not found in the authors map file.
|
||||
"Blog author with key "slorber" not found in the authors map file.
|
||||
Valid author keys are:
|
||||
- yangshun
|
||||
- jmarcey"
|
||||
|
@ -372,7 +375,7 @@ describe('validateAuthorsMap', () => {
|
|||
expect(() =>
|
||||
validateAuthorsMap(authorsMap),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"slorber\\" must contain at least one of [name, imageURL]"`,
|
||||
`""slorber" must contain at least one of [name, imageURL]"`,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -382,7 +385,7 @@ describe('validateAuthorsMap', () => {
|
|||
slorber: undefined,
|
||||
}),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"slorber\\" cannot be undefined. It should be an author object containing properties like name, title, and imageURL."`,
|
||||
`""slorber" cannot be undefined. It should be an author object containing properties like name, title, and imageURL."`,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -392,7 +395,7 @@ describe('validateAuthorsMap', () => {
|
|||
slorber: null,
|
||||
}),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"slorber\\" should be an author object containing properties like name, title, and imageURL."`,
|
||||
`""slorber" should be an author object containing properties like name, title, and imageURL."`,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -400,7 +403,7 @@ describe('validateAuthorsMap', () => {
|
|||
expect(() =>
|
||||
validateAuthorsMap({slorber: []}),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"slorber\\" should be an author object containing properties like name, title, and imageURL."`,
|
||||
`""slorber" should be an author object containing properties like name, title, and imageURL."`,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -414,7 +417,7 @@ describe('validateAuthorsMap', () => {
|
|||
expect(() =>
|
||||
validateAuthorsMap({name: 'Sébastien'}),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"name\\" should be an author object containing properties like name, title, and imageURL."`,
|
||||
`""name" should be an author object containing properties like name, title, and imageURL."`,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -426,7 +429,7 @@ describe('validateAuthorsMap', () => {
|
|||
expect(() =>
|
||||
validateAuthorsMap(authorsMap),
|
||||
).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"slorber\\" should be an author object containing properties like name, title, and imageURL."`,
|
||||
`""slorber" should be an author object containing properties like name, title, and imageURL."`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -139,7 +139,7 @@ describe('validateOptions', () => {
|
|||
it('rejects "abcdef" sidebar count', () => {
|
||||
const userOptions = {blogSidebarCount: 'abcdef'};
|
||||
expect(() => testValidate(userOptions)).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"blogSidebarCount\\" must be one of [ALL, number]"`,
|
||||
`""blogSidebarCount" must be one of [ALL, number]"`,
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -154,7 +154,7 @@ describe('validateOptions', () => {
|
|||
it('rejects 42 sidebar title', () => {
|
||||
const userOptions = {blogSidebarTitle: 42};
|
||||
expect(() => testValidate(userOptions)).toThrowErrorMatchingInlineSnapshot(
|
||||
`"\\"blogSidebarTitle\\" must be a string"`,
|
||||
`""blogSidebarTitle" must be a string"`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue