本文整理汇总了TypeScript中@ephox/bedrock.assert.eq方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.eq方法的具体用法?TypeScript assert.eq怎么用?TypeScript assert.eq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ephox/bedrock.assert
的用法示例。
在下文中一共展示了assert.eq方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
result.fold((resultErr) => {
assert.eq(err, resultErr);
}, (resultValue) => {
示例2: nuSize
UnitTest.test('SizeInputNuTest', () => {
assert.eq({value: 4, unit: 'px'}, nuSize(4, 'px'));
assert.eq({value: 234, unit: ''}, nuSize(234, ''));
assert.eq({value: 36, unit: 'em'}, nuSize(36, 'em'));
});
示例3:
const check = (url, expected) => {
const pattern = UrlPatterns.matchPattern(url);
assert.eq(expected, pattern.url);
};
示例4: function
const testIsAbsoluteUrl = function () {
assert.eq(UrlType.isAbsolute('http://www.site.com'), true);
assert.eq(UrlType.isAbsolute('https://www.site.com'), true);
assert.eq(UrlType.isAbsolute('www.site.com'), false);
assert.eq(UrlType.isAbsolute('file.gif'), false);
};
示例5: function
const testParse = function () {
assert.eq(null, AutocompleteContext.parse('', 0, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('abc', 0, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('@abc', 0, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('@abc', 1, '@', 2).getOr(null));
assert.eq('a', AutocompleteContext.parse('@abc', 2, '@', 2).getOr(null));
assert.eq('abc', AutocompleteContext.parse('@abc', 40, '@', 2).getOr(null));
assert.eq('abc', AutocompleteContext.parse('@def@abc', 40, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('@abc x', 40, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('@abc\u00a0x', 40, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('@abc\tx', 40, '@', 2).getOr(null));
assert.eq(null, AutocompleteContext.parse('@abc\nx', 40, '@', 2).getOr(null));
assert.eq('abc', AutocompleteContext.parse('@abc 123', 4, '@', 2).getOr(null));
};
示例6: function
handler = function (rects) {
assert.eq(rects.elementRect, clientRect(40, 0, 10, 10));
assert.eq(rects.contentAreaRect, clientRect(0, 0, 100, 100));
assert.eq(rects.panelRect, clientRect(0, 0, 20, 10));
return clientRect(1, 2, 3, 4);
};
示例7:
mostUsedTopLevelDomains.forEach(function (tld) {
assert.eq(UrlType.isDomainLike('site.' + tld), true);
assert.eq(UrlType.isDomainLike(' site.' + tld), true);
assert.eq(UrlType.isDomainLike('site.' + tld + ' '), true);
});
示例8: function
const testConvert = function () {
assert.eq({ x: 1, y: 2, w: 3, h: 4 }, Convert.fromClientRect({ left: 1, top: 2, width: 3, height: 4 }));
assert.eq({ x: 2, y: 3, w: 4, h: 5 }, Convert.fromClientRect({ left: 2, top: 3, width: 4, height: 5 }));
assert.eq({ left: 1, top: 2, width: 3, height: 4, bottom: 2 + 4, right: 1 + 3 }, Convert.toClientRect({ x: 1, y: 2, w: 3, h: 4 }));
assert.eq({ left: 2, top: 3, width: 4, height: 5, bottom: 3 + 5, right: 2 + 4 }, Convert.toClientRect({ x: 2, y: 3, w: 4, h: 5 }));
};
示例9: function
const testUuid = function () {
assert.eq(Uuid.uuid('mce').indexOf('mce'), 0);
assert.eq(Uuid.uuid('mce') !== Uuid.uuid('mce'), true);
};