5

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'

VKS
  • 279
  • 4
  • 16

1 Answers1

7

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']
}
Kyle Robinson Young
  • 13,732
  • 1
  • 47
  • 38
  • I just changed ac: ac: ['test/**/*.html']['test/unittest/unit1/*.html'] and now it is working. Thanks. – VKS May 15 '13 at 17:58