gpt4 book ai didi

ember.js - 如何使用 Webstorm 调试 ember 集成测试

转载 作者:行者123 更新时间:2023-12-01 23:48:16 24 4
gpt4 key购买 nike

我正在尝试调试 Webstorm 上的 qunit ember 集成测试。 Qunit 与用于测试 ember 的框架相同。

我们的测试与此类似:

import startApp from '../helpers/start-app';
var App;
module('Integration Tests', {
setup: function() {
App = startApp();
},
teardown: function() {
Ember.run(App, 'destroy');
});

test("Checking hub page",function(){
expect(2);
visit('/hub');

andThen(function(){
console.log(currentRouteName());
ok('in to the function');
});
});

我正在尝试这些设置:

enter image description here

编辑--------------------------------

我更新了我的运行配置,但应用程序退出并出现以下错误:

debugger listening on port 59771
version: 0.1.7
Could not find watchman, falling back to NodeWatcher for file system events
BuildingBuilding.Building..Building...Building...

Build successful - 1853ms.
c[?25l[8;NaNrtty.setRawMode: Use `process.stdin.setRawMode()` instead.

tty.js:37
throw new Error('can\'t set raw mode on non-tty');
^

最佳答案

您应该使用 ember 来运行您的代码。您将它作为一个简单的 node.js 应用程序运行 (node foo-test.js)。此外,除非使用 --harmony 开关运行,否则 Node 将不接受 EcmaScript 6 语法。请确保相应地更新您的运行配置(以运行 ember 并将您的规范作为参数传递给它)

关于ember.js - 如何使用 Webstorm 调试 ember 集成测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28027946/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com