我已经设置了一个新的空手道项目,一切正常,但是当我尝试在"karate-config.js“文件中使用”karate-config.js“时它不识别,当我悬停在它上面时,我会收到以下消息:”缺失导入语句,插入const = require(./Chart.min)“。
这就是我的"karate-config.js“文件的样子:”‘’
函数fn() {
karate.configure("headers", {'Content-Type':'application/x-www-form-urlencoded'})
karate.configure('connectTimeout', 6000000);
karate.configure('readTimeout', 6000000);
var config = {
baseUrl: 'https://someurl',
iprHost: 'https://url',
};
return config;}
And the dependencies I am using are :
"```
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
<version>0.9.6</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.intuit.karate/karate-junit4 -->
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-junit4</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/net.masterthought/cucumber-reporting -->
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>5.6.1</version>
</dependency>
```"发布于 2021-12-02 13:25:50
依赖关系是错误的。还要注意,我们不再支持旧版本了。我建议您使用快速启动,因为它将设置您所需的一切:https://github.com/karatelabs/karate#quickstart。
您可以忽略有关导入语句的消息,空手道的JS版本不需要任何消息。
如果您仍然被困在这个过程中,请遵循以下过程:https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue
https://stackoverflow.com/questions/70199745
复制相似问题