Make WordPress Core

Changeset 26063


Ignore:
Timestamp:
11/09/2013 08:43:58 PM (13 years ago)
Author:
nacin
Message:

Add grunt qunit:compiled to run the QUnit tests on the compiled JS.

props jorbin, kadamwhite.
fixes #25781.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Gruntfile.js

    r26043 r26063  
    2424                                        BUILD_DIR + 'wp-includes/js/tinymce/mark_loaded.js'
    2525                                ]
    26                         }
     26                        },
     27                        qunit: ['tests/qunit/compiled.html']
    2728                },
    2829                copy: {
     
    6566                                dest: BUILD_DIR,
    6667                                src: []
     68                        },
     69                        'qunit-compiled': {
     70                                src: 'tests/qunit/index.html',
     71                                dest: 'tests/qunit/compiled.html',
     72                                options: {
     73                                        processContent: function( src ) {
     74                                                return src.replace( /([^\.])*\.\.\/src/ig , '/../build' );
     75                                        }
     76                                }
    6777                        }
    6878                },
     
    250260                'uglify:tinymce', 'concat:tinymce', 'compress:tinymce', 'clean:tinymce']);
    251261
    252         // Testing task.
     262        // Testing tasks.
    253263        grunt.registerTask('test', ['qunit']);
     264        grunt.registerTask('test:compiled', ['build', 'clean:qunit', 'copy:qunit-compiled', 'qunit']);
    254265
    255266        // Default task.
Note: See TracChangeset for help on using the changeset viewer.