mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-30 17:54:20 +00:00
0f801ea550
Steps to implement: Copy over and adapt setup files, to install Cypress in the Cite code base. Port tests/selenium/specs/backlinks.js and supporting file cite.page.js to run under the Cypress environment, in a second patchset. Run the new suite in CI, replacing the previous selenium integration. Delete the selenium test suite. Bug: T353436 Change-Id: Ie76371e18d8612daa7c7be741432c6f3e0b783b5
42 lines
749 B
JavaScript
42 lines
749 B
JavaScript
/*!
|
|
* Grunt file
|
|
*
|
|
* @package Cite
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
module.exports = function ( grunt ) {
|
|
const conf = grunt.file.readJSON( 'extension.json' );
|
|
|
|
grunt.loadNpmTasks( 'grunt-banana-checker' );
|
|
grunt.loadNpmTasks( 'grunt-eslint' );
|
|
grunt.loadNpmTasks( 'grunt-stylelint' );
|
|
|
|
grunt.initConfig( {
|
|
eslint: {
|
|
options: {
|
|
cache: true,
|
|
fix: grunt.option( 'fix' )
|
|
},
|
|
all: [
|
|
'**/*.{js,json}',
|
|
'!{vendor,node_modules}/**',
|
|
'!cypress/screenshots/**/*.js'
|
|
]
|
|
},
|
|
banana: conf.MessagesDirs,
|
|
stylelint: {
|
|
all: [
|
|
'**/*.css',
|
|
'**/*.less',
|
|
'!node_modules/**',
|
|
'!vendor/**'
|
|
]
|
|
}
|
|
} );
|
|
|
|
grunt.registerTask( 'test', [ 'eslint', 'stylelint', 'banana' ] );
|
|
grunt.registerTask( 'default', 'test' );
|
|
};
|