本文整理匯總了TypeScript中@angular/testing.expect函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript expect函數的具體用法?TypeScript expect怎麽用?TypeScript expect使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了expect函數的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('Should return splitted string as an array', () => {
const result = pipe.transform('abc', 'b', 0);
expect(result).toEqual([]);
});
示例2: it
it('Should return 1.54', () => {
expect(pipe.transform(1.5444, 2)).toEqual(1.54);
});
示例3: it
it('Should do nothing', () => {
expect(pipe.transform('a', 1, '')).toEqual('a');
});
示例4: it
it('Should return the value unchanged', () => {
expect(pipe.transform(1)).toEqual(1);
});
示例5: it
it('should create an instance', () => {
expect(new Usuario()).toBeTruthy();
});
示例6: it
it ('Should return the numbers in ascending order', () => {
const result = pipe.transform(numbers, ['+']);
expect(result).toEqual([-1, 0.214, 1234, 582, 8675309]);
});