本文整理汇总了TypeScript中chai.expect函数的典型用法代码示例。如果您正苦于以下问题:TypeScript expect函数的具体用法?TypeScript expect怎么用?TypeScript expect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了expect函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should return a new instance with defaults when amount and schedule are invalid', () => {
expect(FormaliseRepaymentPlan.fromObject({ 'option': 'INVALID' })).to.deep.equal(new FormaliseRepaymentPlan(
undefined
))
})
示例2: afterEach
afterEach(() => {
const pendingMocks = (mock.pendingMocks() as any).filter(item => item !== retrieveServiceTokenMock.interceptors[0]._key)
expect(pendingMocks, 'At least one mock were declared but not used').to.be.deep.equal([])
})
示例3: it
it('The mark as done button should be displayed', () => {
expect(instance.isMarkAsDoneVisible()).to.equal(true);
});
示例4: it
it("should have a name", () => {
expect(this.errorInstance.name).to.equal("CONVERTER_SERIALIZATION_ERROR");
});
示例5: it
it('should be able to be passed to Observable#thru', () => {
expect(stream().thru(view(x => x))).to.be.an.observable.stream();
expect(prop().thru(view(x => x))).to.be.an.observable.property();
});