gpt4 book ai didi

javascript - Ember 测试失败,返回 `testem.js not loaded?`

转载 作者:行者123 更新时间:2023-11-29 10:58:50 25 4
gpt4 key购买 nike

当使用 ember test 在本地运行测试时,我收到以下针对 ember 项目 的错误消息。大部分时间 PhantomJS 挂起。

$ Ember 测试

not ok 1 Chrome - error
---
message: >
Error: Browser failed to connect within 30s. testem.js not loaded?
Stderr:
2018-07-13 11:24:43.115 Google Chrome[47537:547312] Errors logged by ksadmin: KSKeyedPersistentStore store directory does not exist. [com.google.UpdateEngine.CommonErrorDomain:501 - '/Library/Google/GoogleSoftwareUpdate/TicketStore' - 'KSKeyedPersistentStore.m:368']
KSPersistentTicketStore failed to load tickets. (productID: com.google.Chrome) [com.google.UpdateEngine.CoreErrorDomain:1051 - '/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore'] (KSKeyedPersistentStore store directory does not exist. - '/Library/Google/GoogleSoftwareUpdate/TicketStore' [com.google.UpdateEngine.CommonErrorDomain:501])
ksadmin cannot access the ticket store:<KSUpdateError:0x100404060
domain="com.google.UpdateEngine.CoreErrorDomain"
code=1051
userInfo={
function = "-[KSProductKeyedStore(ProtectedMethods) errorForStoreError:productID:message:timeoutMessage:]";
date = 2018-07-13 03:24:43 +0000;
productids = {(
"com.google.Chrome"
)};
filename = "KSProductKeyedStore.m";
line = 102;
NSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore";
NSUnderlyingError = <KSError:0x100515350
domain="com.google.UpdateEngine.CommonErrorDomain"
code=501
userInfo={
date = 2018-07-13 03:24:43 +0000;
line = 368;
filename = "KSKeyedPersistentStore.m";
function = "-[KSKeyedPersistentStore(PrivateMethods) validateStorePath]";
NSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore";
NSLocalizedDescription = "KSKeyedPersistentStore store directory does not exist.";
}
>;
NSLocalizedDescription = "KSPersistentTicketStore failed to load tickets.";
}
>
[47537:28675:0713/112447.920274:ERROR:ssl_client_socket_impl.cc(1026)] handshake failed; returned -1, SSL error code 1, net_error -107
[47537:28675:0713/112448.006779:ERROR:ssl_client_socket_impl.cc(1026)] handshake failed; returned -1, SSL error code 1, net_error -107
2018-07-13 11:24:52.494 Google Chrome Helper[47600:548065] Couldn't set selectedTextBackgroundColor from default ()


Log: |
{ type: 'error',
text: 'Error: Browser failed to connect within 30s. testem.js not loaded?' }
{ type: 'error',
text: '2018-07-13 11:24:43.115 Google Chrome[47537:547312] Errors logged by ksadmin: KSKeyedPersistentStore store directory does not exist. [com.google.UpdateEngine.CommonErrorDomain:501 - \'/Library/Google/GoogleSoftwareUpdate/TicketStore\' - \'KSKeyedPersistentStore.m:368\']\nKSPersistentTicketStore failed to load tickets. (productID: com.google.Chrome) [com.google.UpdateEngine.CoreErrorDomain:1051 - \'/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore\'] (KSKeyedPersistentStore store directory does not exist. - \'/Library/Google/GoogleSoftwareUpdate/TicketStore\' [com.google.UpdateEngine.CommonErrorDomain:501])\nksadmin cannot access the ticket store:<KSUpdateError:0x100404060\n\tdomain="com.google.UpdateEngine.CoreErrorDomain"\n\tcode=1051\n\tuserInfo={\n\t\tfunction = "-[KSProductKeyedStore(ProtectedMethods) errorForStoreError:productID:message:timeoutMessage:]";\n\t\tdate = 2018-07-13 03:24:43 +0000;\n\t\tproductids = {(\n\t\t\t"com.google.Chrome"\n\t\t)};\n\t\tfilename = "KSProductKeyedStore.m";\n\t\tline = 102;\n\t\tNSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore/Keystone.ticketstore";\n\t\tNSUnderlyingError = <KSError:0x100515350\n\t\t\tdomain="com.google.UpdateEngine.CommonErrorDomain"\n\t\t\tcode=501\n\t\t\tuserInfo={\n\t\t\t\tdate = 2018-07-13 03:24:43 +0000;\n\t\t\t\tline = 368;\n\t\t\t\tfilename = "KSKeyedPersistentStore.m";\n\t\t\t\tfunction = "-[KSKeyedPersistentStore(PrivateMethods) validateStorePath]";\n\t\t\t\tNSFilePath = "/Library/Google/GoogleSoftwareUpdate/TicketStore";\n\t\t\t\tNSLocalizedDescription = "KSKeyedPersistentStore store directory does not exist.";\n\t\t\t}\n\t\t>;\n\t\tNSLocalizedDescription = "KSPersistentTicketStore failed to load tickets.";\n\t}\n>\n[47537:28675:0713/112447.920274:ERROR:ssl_client_socket_impl.cc(1026)] handshake failed; returned -1, SSL error code 1, net_error -107\n[47537:28675:0713/112448.006779:ERROR:ssl_client_socket_impl.cc(1026)] handshake failed; returned -1, SSL error code 1, net_error -107\n2018-07-13 11:24:52.494 Google Chrome Helper[47600:548065] Couldn\'t set selectedTextBackgroundColor from default ()\n' }



1..1
# tests 1
# pass 0
# skip 0
# fail 1
Testem finished with non-zero exit code. Tests failed.

testem.js:
/*jshint节点:真*/
模块.exports = {
“框架”:“数量单位”,
"test_page": "tests/index.html?hidepassed",
“disable_watching”:是的,
“launch_in_ci”:[
“ Chrome ”
],
“launch_in_dev”:[
"幻影",
“ Chrome ”
]
};

已安装的版本:
MacOS 塞拉利昂 10.12.6
节点:6.12.2
npm:5.6.0
Ember :2.12.0
Ember -cli:2.18.2
幻影:2.1.1

下面是我的 tests/index.html 文件的一部分:

<script src="testem.js" integrity=""></script>
<script src="assets/vendor.js"></script>
<script src="assets/test-support.js"></script>
<script src="assets/myApp.js"></script>
<script src="assets/tests.js"></script>

也尝试使用 ember test --server 但同样的错误。所以任何人都知道如何缩小范围以及为什么 testem 没有加载?

最佳答案

对于测试,通常您需要在启用远程调试的情况下以 headless 模式运行 chrome。将这些行添加到您的 testem.json 应该会有所帮助:

"browser_args": {
"Chrome": [
'--headless',
'--disable-gpu',
'--remote-debugging-port=9222',
'--window-size=1440,900',
]
}

我还建议删除“PhantomJS”行 - 由于 this issue,phantom 可能不适用于最近的 ember 版本.

关于javascript - Ember 测试失败,返回 `testem.js not loaded?`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51317567/

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