當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Test.deepEqual方法代碼示例

本文整理匯總了TypeScript中nodeunit.Test.deepEqual方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Test.deepEqual方法的具體用法?TypeScript Test.deepEqual怎麽用?TypeScript Test.deepEqual使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在nodeunit.Test的用法示例。


在下文中一共展示了Test.deepEqual方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

  'getNavigation returns td.output.NavigationItem in which all url extensions are replaced with .md': (test: Test) => {
    // stub super method
    const original = td.output.DefaultTheme.prototype.getNavigation;
    td.output.DefaultTheme.prototype.getNavigation = () => {
      return {
        title: 'title',
        url: 'a.html',
        dedicatedUrls: [
          'b.html',
          'c.html#1',
          'd.html'
        ],
        parent: null,
        children: [
          {
            title: 'title',
            url: 'e.html#2',
            dedicatedUrls: [
              'f.html',
              'g.html#3'
            ],
            parent: null,
            children: [
              {
                title: 'title',
                url: 'h.html',
                dedicatedUrls: [
                  'i.html#4'
                ],
                parent: null,
                children: [],
                cssClasses: 'bar',
                isLabel: true,
                isVisible: true,
                isCurrent: true,
                isGlobals: true,
                isInPath: true
              }
            ],
            cssClasses: 'bar',
            isLabel: true,
            isVisible: true,
            isCurrent: true,
            isGlobals: true,
            isInPath: true
          },
          {
            title: 'title',
            url: 'j.html#5',
            dedicatedUrls: [
              'k.html#6',
              'l.html',
              'm.html',
              'n.html#7'
            ],
            parent: null,
            children: null,
            cssClasses: 'bar',
            isLabel: true,
            isVisible: true,
            isCurrent: true,
            isGlobals: true,
            isInPath: true
          }
        ],
        cssClasses: 'foo bar',
        isLabel: true,
        isVisible: true,
        isCurrent: true,
        isGlobals: true,
        isInPath: true
      };
    };

    test.deepEqual(
      MarkdownTheme.prototype.getNavigation(null),
      {
        title: 'title',
        url: 'a.md',
        dedicatedUrls: [
          'b.md',
          'c.md#1',
          'd.md'
        ],
        parent: null,
        children: [
          {
            title: 'title',
            url: 'e.md#2',
            dedicatedUrls: [
              'f.md',
              'g.md#3'
            ],
            parent: null,
            children: [
              {
                title: 'title',
                url: 'h.md',
                dedicatedUrls: [
                  'i.md#4'
//.........這裏部分代碼省略.........
開發者ID:doktordirk,項目名稱:typedoc-markdown-theme,代碼行數:101,代碼來源:theme_test.ts


注:本文中的nodeunit.Test.deepEqual方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。