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


TypeScript assert.deepEqual方法代码示例

本文整理汇总了TypeScript中chai.assert.deepEqual方法的典型用法代码示例。如果您正苦于以下问题:TypeScript assert.deepEqual方法的具体用法?TypeScript assert.deepEqual怎么用?TypeScript assert.deepEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在chai.assert的用法示例。


在下文中一共展示了assert.deepEqual方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: test

  test('scans properties', async () => {
    const namespaces = await getNamespaces('namespace-properties.js');
    assert.equal(namespaces.length, 1);

    assert.equal(namespaces[0].name, 'PropertiesNamespace');
    assert.equal(namespaces[0].description, '');
    assert.deepEqual(namespaces[0].warnings, []);
    assert.deepEqual(getProperties(namespaces[0]), [
      {
        name: 'property',
        description: undefined,
        privacy: 'public',
        readOnly: false,
        type: 'string',
        warnings: []
      },
      {
        name: 'propertyWithAnnotation',
        description: 'Property with annotation',
        privacy: 'public',
        readOnly: false,
        type: '(string | number)',
        warnings: []
      },
      {
        name: 'propertyWithReadOnly',
        description: undefined,
        privacy: 'public',
        readOnly: true,
        type: 'string',
        warnings: []
      },
      {
        name: 'propertyWithGetter',
        description: undefined,
        privacy: 'public',
        readOnly: true,
        type: undefined,
        warnings: []
      },
      {
        name: 'propertyWithGetterSetter',
        description: undefined,
        privacy: 'public',
        readOnly: false,
        type: undefined,
        warnings: []
      },
      {
        name: 'propertyWithSetterFirst',
        description: undefined,
        privacy: 'public',
        readOnly: false,
        type: undefined,
        warnings: []
      },
      {
        name: 'propertyDefinedLater',
        description: undefined,
        privacy: 'public',
        readOnly: false,
        type: 'string',
        warnings: []
      },
      {
        name: 'propertyDefinedLaterWithAnnotation',
        description: 'Test property',
        privacy: 'public',
        readOnly: false,
        type: 'boolean',
        warnings: []
      },
      {
        name: 'propertyDefinedLaterWithoutValue',
        description: undefined,
        privacy: 'public',
        readOnly: false,
        type: 'string',
        warnings: []
      }
    ]);
  });
开发者ID:MehdiRaash,项目名称:tools,代码行数:82,代码来源:namespace-scanner_test.ts

示例2: assertElements

			return helpers.executeActionByChunks(initialData, chunkSize, (element: number, index: number) => {
				handledElements.push(element);
				assert.deepEqual(element, initialData[index]);
				assert.isTrue(initialData.indexOf(element) !== -1);
				return assertElements(initialData, handledElements, element, chunkSize);
			});
开发者ID:telerik,项目名称:mobile-cli-lib,代码行数:6,代码来源:helpers.ts

示例3: it

 it('should center on y', function() {
   assert.deepEqual(props.y, { value: 10.5 });
 });
开发者ID:Afelio,项目名称:vega-lite,代码行数:3,代码来源:text.test.ts

示例4:

		const assertPidTestData = (testData: IiOSSimulatorPidTestData) => {
			const actualResult = helpers.getPidFromiOSSimulatorLogs(testData.appId || appId, testData.input);
			assert.deepEqual(actualResult, testData.expectedResult, `For input ${testData.input}, the expected result is: ${testData.expectedResult}, but actual result is: ${actualResult}.`);
		};
开发者ID:telerik,项目名称:mobile-cli-lib,代码行数:4,代码来源:helpers.ts

示例5: it

		it("returns false when Object.create(null) is passed", () => {
			const actualResult = helpers.toBoolean(Object.create(null));
			assert.deepEqual(actualResult, false);
		});
开发者ID:telerik,项目名称:mobile-cli-lib,代码行数:4,代码来源:helpers.ts

示例6: it

 it('should correctly parse an encoding query given a fieldDefShorthand with timeunit function', () => {
   const encQ = shorthandParser.fn('hours(a,t)');
   assert.deepEqual(encQ, {field: 'a', timeUnit: TimeUnit.HOURS, type: Type.TEMPORAL});
 });
开发者ID:herrstucki,项目名称:compassql,代码行数:4,代码来源:shorthand.test.ts


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