當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。