mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
checkModules.js: Run as part of CI
* Add to npm run test, and exit with error code * Improve output message, with instructions on how to add to ignore list. Change-Id: Id4ed56673e84073ac06468bdc429c138466e2501
This commit is contained in:
parent
fc9c8bed20
commit
2eafc3ddc2
|
@ -78,8 +78,13 @@ function checkFiles() {
|
|||
} );
|
||||
|
||||
if ( missingFiles.length ) {
|
||||
console.log( missingFiles.length + ' missing file(s):' );
|
||||
console.log( missingFiles.join( '\n' ) );
|
||||
console.error(
|
||||
`${ missingFiles.length } file(s) from lib/ve/modules.json are missing from extension.json:\n\n` +
|
||||
missingFiles.map( ( file ) => `* ${ file }\n` ).join( '' ) +
|
||||
'\nIf any of these files are not required, add them to the ignore list in build/checkModules.js.'
|
||||
);
|
||||
// eslint-disable-next-line n/no-process-exit
|
||||
process.exit( 1 );
|
||||
} else {
|
||||
console.log( 'No missing files.' );
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"eslint": "eslint --cache --ext .js,.json .",
|
||||
"eslint-fix": "eslint --cache --ext .js,.json --fix .",
|
||||
"api-testing": "mocha --timeout 0 --parallel --recursive tests/api-testing",
|
||||
"test": "grunt test",
|
||||
"test": "grunt test && node build/checkModules.js",
|
||||
"doc": "jsdoc -c .jsdoc.json",
|
||||
"screenshots-all": "grunt screenshots-all",
|
||||
"selenium-daily": "npm run selenium-test -- --mochaOpts.grep @daily",
|
||||
|
|
Loading…
Reference in a new issue