mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 09:07:29 +02:00
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies * chore(v2): upgrade devDependencies * chore: prettier
This commit is contained in:
parent
ea8c916528
commit
b07507c9cc
148 changed files with 2385 additions and 1975 deletions
|
@ -47,7 +47,7 @@ describe('Build files', () => {
|
|||
glob(`${buildDir}/${siteConfig.projectName}/docs/**/*.html`),
|
||||
glob(`${docsDir}/assets/*`),
|
||||
glob(`${buildDir}/${siteConfig.projectName}/img/*`),
|
||||
]).then(results => {
|
||||
]).then((results) => {
|
||||
[
|
||||
inputMarkdownFiles,
|
||||
outputHTMLFiles,
|
||||
|
@ -62,15 +62,15 @@ describe('Build files', () => {
|
|||
});
|
||||
|
||||
test('Build folder exists', () =>
|
||||
fs.stat(buildDir).then(status => {
|
||||
fs.stat(buildDir).then((status) => {
|
||||
expect(status.isDirectory()).toBeTruthy();
|
||||
}));
|
||||
|
||||
test('Generated HTML for each Markdown resource', () => {
|
||||
const metadata = outputHTMLFiles.map(file =>
|
||||
const metadata = outputHTMLFiles.map((file) =>
|
||||
filepath.create(file).basename(),
|
||||
);
|
||||
inputMarkdownFiles.forEach(file => {
|
||||
inputMarkdownFiles.forEach((file) => {
|
||||
const data = fs.readFileSync(file, 'utf8');
|
||||
const frontmatter = fm(data);
|
||||
expect(metadata).toContain(`${frontmatter.attributes.id}.html`);
|
||||
|
@ -78,17 +78,17 @@ describe('Build files', () => {
|
|||
});
|
||||
|
||||
test('Generated table of contents', () => {
|
||||
outputHTMLFiles.forEach(file => {
|
||||
outputHTMLFiles.forEach((file) => {
|
||||
const fileContents = fs.readFileSync(file, 'utf8');
|
||||
expect(fileContents).not.toContain('<AUTOGENERATED_TABLE_OF_CONTENTS>');
|
||||
});
|
||||
});
|
||||
|
||||
test('Copied assets from /docs/assets', () => {
|
||||
const metadata = outputAssetsFiles.map(file =>
|
||||
const metadata = outputAssetsFiles.map((file) =>
|
||||
filepath.create(file).basename(),
|
||||
);
|
||||
inputAssetsFiles.forEach(file => {
|
||||
inputAssetsFiles.forEach((file) => {
|
||||
const path = filepath.create(file);
|
||||
expect(metadata).toContain(path.basename());
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue