本文整理汇总了TypeScript中@ephox/agar.Assertions.assertEq方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Assertions.assertEq方法的具体用法?TypeScript Assertions.assertEq怎么用?TypeScript Assertions.assertEq使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@ephox/agar.Assertions
的用法示例。
在下文中一共展示了Assertions.assertEq方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
const sTestHasStrongRtl = Step.sync(function () {
Assertions.assertEq('Hebrew is strong rtl', true, Bidi.hasStrongRtl('\u05D4\u05E7\u05D3\u05E9'));
Assertions.assertEq('Abc is not strong rtl', false, Bidi.hasStrongRtl('abc'));
Assertions.assertEq('Dots are neutral', false, Bidi.hasStrongRtl('.'));
});
示例2:
return Step.sync(function () {
const rng = editor.selection.getRng();
const sc = rng.startContainer, so = rng.startOffset;
const chr = sc.data.substr(so - 1, 1);
Assertions.assertEq('Should be after a zwsp at caret', chr, Zwsp.ZWSP);
});
示例3:
return Step.sync(function () {
Assertions.assertEq('Should have the right caret data', expectedCaretData, editor.selection.getNode().getAttribute('data-mce-caret'));
});
示例4:
return Step.sync(function () {
Assertions.assertEq('checking normalization counter', expected, count);
});
示例5: function
Arr.each(textCases, function (c) {
Assertions.assertEq(c.label || 'Asserting: ' + c.content, c.isText, Newlines.isPlainText(c.content));
});
示例6: function
const assertRange = function (expected, actual) {
Assertions.assertEq('startContainers should be equal', true, expected.startContainer === actual.startContainer);
Assertions.assertEq('startOffset should be equal', true, expected.startOffset === actual.startOffset);
Assertions.assertEq('endContainer should be equal', true, expected.endContainer === actual.endContainer);
Assertions.assertEq('endOffset should be equal', true, expected.endOffset === actual.endOffset);
};
示例7:
Chain.op((element) => {
Assertions.assertEq(`The input value for ${Label} should be: `, expected, Value.get(element));
})
示例8:
return Chain.op(function (linebreak: LineInfo) {
const actualBreakType = linebreak.breakType;
Assertions.assertEq('Should be the expected break type', expectedBreakType, actualBreakType);
});
示例9:
return Step.sync(function () {
const result = editor[name]();
Assertions.assertEq('Should be expected value on a removed editor', expectedValue, result);
});