Skip to content

Commit 1192d76

Browse files
JessicaSachsShinigami92
authored andcommitted
fix: removing toc to fix the docs html (faker-js#341)
Co-authored-by: Shinigami <[email protected]>
1 parent d032433 commit 1192d76

File tree

4 files changed

+24
-7
lines changed

4 files changed

+24
-7
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,6 @@ REVISION
9191
.yarn/
9292
package-lock.json
9393
yarn.lock
94+
95+
cypress/screenshots
96+
cypress/videos

cypress.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"video": false,
33
"e2e": {
4+
"chromeWebSecurity": false,
45
"baseUrl": "http://localhost:5000",
56
"integrationFolder": "cypress/e2e",
67
"testFiles": "**/*.cy.*",

cypress/e2e/smoke.cy.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
describe('Smoke Test', () => {
2-
it('compiles the guide page', () => {
2+
beforeEach(() => {
33
cy.visit('/guide/');
4+
cy.get('a[href="/api/animal.html"]').as('firstSectionLink');
5+
});
6+
7+
it('compiles the guide page', () => {
48
cy.contains('Getting Started');
59
});
610

7-
// it('compiles the playground page', () => {
8-
// cy.visit('/playground/');
9-
// cy.contains('Playground under construction');
10-
// });
11+
it('renders this last code example in the code', () => {
12+
// Click on any section in the sidebar
13+
cy.get('@firstSectionLink')
14+
.click()
15+
// Make sure the number of code examples is the same between reloads
16+
.get('.container pre code')
17+
.then(($codeBlocks) => {
18+
// Trigger a reload
19+
cy.reload()
20+
// Give the runtime a chance to update/fail
21+
.wait(500)
22+
.get('.container pre code')
23+
.should('have.length', $codeBlocks.length);
24+
});
25+
});
1126
});

scripts/apidoc.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ async function build(): Promise<void> {
102102
<!-- This file is automatically generated. -->
103103
<!-- Run '${scriptCommand}' to update -->
104104
105-
[[toc]]
106-
107105
::: v-pre
108106
109107
${toBlock(module.comment)}

0 commit comments

Comments
 (0)