mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
d99031ba46
This patch: - moves doclint under utils/ folder - adds tests to verify doclint basic functionality This patch also drops the jasmine as a spec runner for the doclint checks. It turned out it's hard to customize jasmine's behavior, so instead this patch implements a dummy spec runner. The dummy spec runner allows us: - to format messages however we want (the custom jasmine reporter would also allow us to do this) - to avoid `beforeAll` functions which pollute global to pass initialized variables over to specs References #14
666 B
666 B
DocLint
Doclint is a small program that lints Puppeteer's documentation against Puppeteer's source code.
Doclint works in a few steps:
- Read sources in
lib/
folder, parse AST trees and extract public API - Read sources in
docs/
folder, render markdown to HTML, use puppeteer to traverse the HTML and extract described API - Compare one API to another
Doclint is also responsible for general markdown checks, most notably for the table of contents relevancy.
Running
npm run doc
Tests
Doclint has its own set of jasmine tests, located at utils/doclint/test
folder.
To execute tests, run:
npm run test-doclint