QUnit: test minified files
Fixes #32574. git-svn-id: https://develop.svn.wordpress.org/trunk@32698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cb73a0cc1a
commit
66f327cff2
@ -118,9 +118,10 @@ module.exports = function(grunt) {
|
||||
dest: 'tests/qunit/compiled.html',
|
||||
options: {
|
||||
processContent: function( src ) {
|
||||
src = src.replace( /([^\.])*\.\.\/src/ig , '/../build' );
|
||||
src = src.replace( '/jquery/ui/core.js', '/jquery/ui/core.min.js' );
|
||||
return src;
|
||||
return src.replace( /(\".+?\/)src(\/.+?)(?:.min)?(.js\")/g , function( match, $1, $2, $3 ) {
|
||||
// Don't add `.min` to files that don't have it.
|
||||
return $1 + 'build' + $2 + ( /jquery$/.test( $2 ) ? '' : '.min' ) + $3;
|
||||
} );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user