【问题标题】:Running ng e2e removes dist folder and doesn't look for the compiled .js files运行 ng e2e 会删除 dist 文件夹并且不会查找已编译的 .js 文件
【发布时间】:2017-12-07 01:57:06
【问题描述】:

我正在尝试运行 ng e2e 来运行我的量角器测试。我编译的 .js 文件保存在“dist”文件夹中。但是,每当我运行“ng e2e”时,我观察到我的 dist 文件夹已被删除,并且 ng e2e 的结果是找不到规范,因为在我运行 ng e2e 时删除了“dist”文件夹中的已编译文件。

另外,我的 protractor.conf.js 文件包含与“jasmine2-protractor-utils”和“protractor-html-reporter”相关的插件。所以,当我运行“ng e2e”时,它说没有找到“jasmine2-protractor-utils”的模块。

当我使用 'protractor conf.js' 命令直接运行上述所有测试时,它们都可以正常工作。您能否建议如何使用“ng e2e”实现相同的结果,以便在构建环境时使用它。

提前致谢!

【问题讨论】:

    标签: protractor jasmine2.0


    【解决方案1】:

    要阻止 ng e2e 删除您的 /dist 目录运行

    ng e2e --delete-output-path=false

    要了解更多 Angular CLI 命令行参数运行

    ng help

    【讨论】:

      猜你喜欢
      • 2021-03-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-30
      • 1970-01-01
      相关资源
      最近更新 更多