Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunt qunit is failing

I have configured my qunit task is grunt as below:

 // Unit Test Configuration
    qunit: {
        ac: {
            files: ['test/**/*.html']
        }
    }
    grunt.registerTask('ac', ['jshint:ac', 'qunit:ac']);

jsHint is running fine. But with qunit i am getting error:

Running "qunit:ac" (qunit) task Warning: Cannot use 'in' operator to search for 'src'

like image 947
VKS Avatar asked May 14 '13 08:05

VKS


1 Answers

Change files: ['test/**/*.html'] to src: ['test/**/*.html']. The files property is intended for multiple src/dest pairings. See http://gruntjs.com/configuring-tasks#files-object-format

For example:

qunit: {
  ac: {
    files: [{
      src: ['test/**/*.html']
    }, {
      src: ['test2/**/*.html']
    }]
  }
}

A more simple config if you just want test/**/*.html would be:

qunit: {
  ac: ['test/**/*.html']
}
like image 136
Kyle Robinson Young Avatar answered Sep 22 '22 18:09

Kyle Robinson Young