2
运行grunt server
进行开发时,如何单独使用grunt qunit
任务来运行测试。 虽然试图通过["test/**/*.html"]
到all
财产,但无法运行和返回(Warning: 0/0 assertions ran (0ms) Use
)grunt qunit与grunt服务器联合使用
看起来,它不把火关phantomjs实例,并没有找到这些馅饼。 所以我尝试以下
grunt.initConfig({
....
qunit: {
all: {
options: {
urls: ['http://localhost:<%= connect.options.port %>/test/tests/foo.html']
}
}
}
....
});
它只能如果在手动包括所有的测试html页面(比如上例中)。
问题是 我的问题是,可以grunt qUnit即使在使用grunt服务器时也能正常工作。 我怎样才能["test/**/*.html"]
语法正常工作。我相信肯定会有更好的方法,这应该工作! 另外,如何使用grunt.file.expand以编程方式添加匹配文件以在grunt qunit任务中运行。