我有这个茉莉花测试我和Karma一起跑:
describe('When a logged in user chooses Rent and Payment PIN is enabled', function() {
beforeEach(function(){
});
afterEach(function() {
});
it('should be presented with a dialog to enter the pin', function() {
//test to be skipped
})
})
Run Code Online (Sandbox Code Playgroud)
我希望在报告中看到该测试已被跳过,并且在测试所需的所有内容准备好后再回来测试.
我怎么能做到这一点?
我在DOctrine中创建了这样的条目.我正在尝试添加到页面的篮子.这是我的实体:我的实体:
<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @Entity(repositoryClass="App\Repository\Page")
* @Table(name="page")
*/
class Page
{
/**
* @Id @Column(type="integer", name="p_id")
* @GeneratedValue
*/
private $p_id;
/** @Column(type="string", name="p_title") */
private $p_title;
/** @Column(type="datetime", name="p_created") */
private $p_created_at;
/** @Column(type="datetime", name="p_updated_at") */
private $p_updated_at;
/** @Column(type="text", name="p_abstract") */
private $p_abstract;
/** @Column(type="text", name="p_fulltext", nullable=false) */
private $p_fulltext;
/** @Column(type="string", name="p_author", nullable=true) */
private $p_author;
/** @Column(type="string", name="p_url",nullable=true) */
private $p_url;
/** @Column(type="string", name="p_meta_title",nullable=true) */
private $p_meta_title;
/** @Column(type="string", name="p_meta_keywords",nullable=true) */
private …Run Code Online (Sandbox Code Playgroud) 我有基本的反应本机应用程序并尝试在Genymon中运行.我正在收到错误
java.util.concurrent.ExecutionException: java.lang.RuntimeException:: ReferenceError: Can't find variable: require(http://10.0.3.2:8081/index.android.bundle?platform=android&dev-true
Run Code Online (Sandbox Code Playgroud)
我使用El capitan在Mac上工作,所有配置都由Facebook for android dep建议,
我正在运行编译:
../node_modules/react-native-cli/index.js run-android
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用JEST测试我的服务并使用nock模拟端点.服务看起来像这样
export async function get(id) {
const params = {
mode: 'cors',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
};
let response = await fetch(`{$API}/projects/${id}`, params);
return response.json();
}
Run Code Online (Sandbox Code Playgroud)
测试:
import {
get
} from './project';
import nock from 'nock';
const fetchNockProject = nock($API)
.get('/projects/1')
.reply('200', {});
const data = await get(1);
expect(data).resolves.toEqual(project);
Run Code Online (Sandbox Code Playgroud)
当我运行测试时,我收到错误:
console.error node_modules/jsdom/lib/jsdom/virtual-console.js:29错误:交叉原点null禁止
TypeError:网络请求失败
任何想法为什么虚拟控制台抛出这个,因为这只是服务.
我试图了解如何添加d3图表以响应原生应用程序.我发现的唯一信息是使用webView,但非常感谢有一些工作的例子可能在github中.
试图在CircleCi上运行构建,但测试失败。同样的东西在我的本地设备上运行完美。我的.babelrc配置:
{
"presets": [
"es2015",
"react",
"stage-2"
],
"plugins": [
"transform-class-properties",
"react-hot-loader/babel",
["babel-plugin-transform-builtin-extend", {
"globals": ["Error", "Array"]
}],
["transform-runtime", {
"polyfill": false,
"regenerator": true
}]
]
}
Run Code Online (Sandbox Code Playgroud)
我从circleCI获取错误:
yarn test v0.27.5
$ jest
FAIL src/utils/service-helper.test.js
? Test suite failed to run
ReferenceError: [BABEL] /home/circleci/repo/src/utils/service-helper.test.js: Unknown option: /home/circleci/repo/node_modules/react/index.js.Children. Check out http://babeljs.io/docs/usage/options/ for more information about options.
A common cause of this error is the presence of a configuration options object without the corresponding preset name. Example:
Invalid:
`{ presets: [{option: value}] …Run Code Online (Sandbox Code Playgroud) 数据我正在向paypal请求(SetExpressCheckout)
[METHOD] => SetExpressCheckout
[ENDPOINT] => https://api-3t.sandbox.paypal.com/nvp
[USER] => ***
[PWD] => ***
[SIGNATURE] => ***
[VERSION] => 84.0
[TOKEN] =>
[CURRENCYCODE] => GBP
[RETURNURL] => http://experiment.loc/
[CANCELURL] => http://experiment.loc/?action=cancel
[SHIPPINGAMT] => 2.21
[SOLUTIONTYPE] => Sole
[LANDINGPAGE] => Billing
[L_ITEMCATEGORY0] => Physical
[L_QTY0] => 4
[L_AMT0] => 2.20
[L_DESC0] => ZajÄ…czek 1
[L_NAME0] => ZajÄ…czek 1
[L_CURRENCYCODE0] => GBP
[L_ITEMCATEGORY1] => Physical
[L_QTY1] => 1
[L_AMT1] => 3.20
[L_DESC1] => ZajÄ…czek 2
[L_NAME1] => ZajÄ…czek 2
[L_CURRENCYCODE1] => GBP
[PAYMENTREQUEST_PAYMENTACTION] …Run Code Online (Sandbox Code Playgroud) 我的项目正在使用框架,框架和项目都使用相同的枚举值。但是,当我将参数从主应用程序传递到模块控制器时,我发现它们并不相同,因此方法是将其转换。我创建扩展:
extension Result {
init(_ data: Messaging.MessagingResult) {
switch data {
case .authenticationFailed: self = .authenticationFailed
case .connectionError: self = .connectionError
}
}
}
Run Code Online (Sandbox Code Playgroud)
现在我必须创建将项目枚举带回到模块枚举的函数
let adaptedConsume = transform(from: self.consume)
Run Code Online (Sandbox Code Playgroud)
这是正确的方法吗?变换函数应该是什么样子
react-native ×2
android ×1
babel-jest ×1
babeljs ×1
circleci-2.0 ×1
d3.js ×1
doctrine-orm ×1
genymotion ×1
jasmine ×1
jestjs ×1
karma-runner ×1
nock ×1
paypal ×1
swift ×1