mirror of
https://github.com/shelljs/shelljs.git
synced 2025-12-08 20:35:51 +00:00
No change to logic. This checks for stale README in the unit tests instead of by calling 'gendocs' directly. The main goal is for GitHub CI to stop getting tripped up by package-lock.json formatting changes. `npm install` sometimes overwrites the package-lock file with a new format, and this breaks the after-travis step. Test: node_modules/.bin/ava test/docs.js
12 lines
301 B
JavaScript
12 lines
301 B
JavaScript
const test = require('ava');
|
|
|
|
const gendocs = require('../scripts/generate-docs');
|
|
|
|
test('Documentation generation', t => {
|
|
if (gendocs.extractCurrentDocs() === gendocs.generateNewDocs()) {
|
|
t.pass();
|
|
} else {
|
|
t.fail('README documentation is stale. Please run `npm run gendocs`.');
|
|
}
|
|
});
|