mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
chore(v2): fix code style (revert previous changes)
This commit is contained in:
parent
1480a7eb80
commit
1f00d15c74
143 changed files with 457 additions and 458 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