本文整理匯總了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,
});
};