我想知道如何提供变量数组,让Jasmine每次使用其中一个值运行所有测试。
关于故事:
一个选项可能是通过shell脚本运行jasmine并在每次调用之前传递浏览器全局变量,但我不喜欢这个想法。
PS:这些问题可能与to this one
有关答案 0 :(得分:0)
通过业力,你可以传递一系列你想要测试的浏览器。
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '..',
// frameworks to use
frameworks: [
'jasmine'
],
// Here the rest of the config
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome', 'Safari'],
})
};