当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Assertions.assertEq方法代码示例

本文整理汇总了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('.'));
 });
开发者ID:abstask,项目名称:tinymce,代码行数:5,代码来源:BidiTest.ts

示例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);
 });
开发者ID:danielpunkass,项目名称:tinymce,代码行数:6,代码来源:ArrowKeysInlineBoundariesTest.ts

示例3:

 return Step.sync(function () {
   Assertions.assertEq('Should have the right caret data', expectedCaretData, editor.selection.getNode().getAttribute('data-mce-caret'));
 });
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:3,代码来源:DeleteElementTest.ts

示例4:

 return Step.sync(function () {
   Assertions.assertEq('checking normalization counter', expected, count);
 });
开发者ID:aha-app,项目名称:tinymce-word-paste-filter,代码行数:3,代码来源:SelectionQuirksTest.ts

示例5: function

 Arr.each(textCases, function (c) {
   Assertions.assertEq(c.label || 'Asserting: ' + c.content, c.isText, Newlines.isPlainText(c.content));
 });
开发者ID:danielpunkass,项目名称:tinymce,代码行数:3,代码来源:NewlinesTest.ts

示例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);
 };
开发者ID:abstask,项目名称:tinymce,代码行数:6,代码来源:RangeUtilsTest.ts

示例7:

 Chain.op((element) => {
   Assertions.assertEq(`The input value for ${Label} should be: `, expected, Value.get(element));
 })
开发者ID:tinymce,项目名称:tinymce,代码行数:3,代码来源:FullPageDialogPluginTest.ts

示例8:

 return Chain.op(function (linebreak: LineInfo) {
   const actualBreakType = linebreak.breakType;
   Assertions.assertEq('Should be the expected break type',  expectedBreakType, actualBreakType);
 });
开发者ID:abstask,项目名称:tinymce,代码行数:4,代码来源:LineReaderTest.ts

示例9:

 return Step.sync(function () {
   const result = editor[name]();
   Assertions.assertEq('Should be expected value on a removed editor', expectedValue, result);
 });
开发者ID:tinymce,项目名称:tinymce,代码行数:4,代码来源:EditorRemovedApiTest.ts


注:本文中的@ephox/agar.Assertions.assertEq方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。