本文整理汇总了TypeScript中@kbn/expect.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了default函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should show correct data', async () => {
const expectedMetricValue = '156';
await PageObjects.visualize.waitForVisualization();
const value = await PageObjects.visualBuilder.getMetricValue();
log.debug(`metric value: ${value}`);
expect(value).to.eql(expectedMetricValue);
});
示例2: expect
.then(resp => {
const lastEventTime = resp.data.source.LastEventTime;
expect(lastEventTime).to.eql({
__typename: 'LastEventTimeData',
lastSeen: '2019-04-26T21:45:14.012Z',
});
});
示例3: expect
const expectRbacForbiddenForUnknownType = (resp: { [key: string]: any }) => {
expect(resp.body).to.eql({
statusCode: 403,
error: 'Forbidden',
message: `Unable to bulk_create dashboard,globaltype,wigwags, missing action:saved_objects/wigwags/bulk_create`,
});
};
示例4: expect
const expectReservedSpaceResult = (resp: { [key: string]: any }) => {
expect(resp.body).to.eql({
error: 'Bad Request',
statusCode: 400,
message: `This Space cannot be deleted because it is reserved.`,
});
};
示例5: expect
const createExpectNotFoundResult = () => (resp: { [key: string]: any }) => {
expect(resp.body).to.eql({
error: 'Not Found',
message: 'Not Found',
statusCode: 404,
});
};