在配置中带有2个框架的量角器

时间:2019-01-10 22:59:35

标签: protractor

我将量角器与黄瓜一起使用,我想在配置文件“ jasmine”和“ custom”中指定框架。可能吗?下面不起作用

exports.config = {
  framework: ['jasmine','custom']

请帮帮我

1 个答案:

答案 0 :(得分:2)

在配置中,framework属性的类型为字符串,而不是数组字符串。

  /**
   * Test framework to use. This may be one of: jasmine, mocha or custom.
   * Default value is 'jasmine'
   *
   * When the framework is set to "custom" you'll need to additionally
   * set frameworkPath with the path relative to the config file or absolute:
   *
   *   framework: 'custom',
   *   frameworkPath: './frameworks/my_custom_jasmine.js',
   *
   * See github.com/angular/protractor/blob/master/lib/frameworks/README.md
   * to comply with the interface details of your custom implementation.
   *
   * Jasmine is fully supported as test and assertion frameworks.
   * Mocha has limited support. You will need to include your
   * own assertion framework (such as Chai) if working with Mocha.
   */
  framework?: string;

https://github.com/angular/protractor/blob/master/lib/config.ts#L620