Grunt qunit is failing
Asked Answered
A

1

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'

Ample answered 14/5, 2013 at 8:54 Comment(0)
D
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']
}
Domela answered 14/5, 2013 at 23:21 Comment(1)
I just changed ac: ac: ['test/**/*.html']['test/unittest/unit1/*.html'] and now it is working. Thanks.Ample

© 2022 - 2024 — McMap. All rights reserved.