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


TypeScript assert.notDeepEqual方法代码示例

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


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

示例1: it

    it('should apply options', () => {
      let appliedOptions = getRepository().applyOptions(getRepository().getQueryBuilder(), {
        select: 'name',
      });

      assert.notDeepEqual(appliedOptions, getRepository().getQueryBuilder());
    });
开发者ID:RWOverdijk,项目名称:wetland,代码行数:7,代码来源:EntityRepository.spec.ts

示例2: it

 it('should remove the item from the array', () => {
   let removedValue = dummy.values[1];
   let lastValue = dummy.values[2];
   dummy.remove(removedValue);
   assert.lengthOf(dummy.values, 2, 'dummy.values should now be 2 items');
   assert.notDeepEqual(dummy.values[1], removedValue, 'value[1] should now be a different value after remove');
   assert.deepEqual(dummy.values[1], lastValue, 'value[1] should now be equal to the last value');
 });
开发者ID:cafreeman,项目名称:mobx-microstates,代码行数:8,代码来源:List.spec.ts

示例3: it

  it('should shuffle an array', () => {
    const arr = [1, 2, 3, 4, 5, 6];
    let arrCopy = [...arr];

    shuffleArray(arrCopy);

    assert.notDeepEqual(arr, arrCopy);
    assert.deepEqual(arr, arrCopy.sort());
  });
开发者ID:JoshGlazebrook,项目名称:socks,代码行数:9,代码来源:socksclient.test.ts

示例4: it

			it("returns proper result when async",  () => {
				const promise = testInstance.testAsyncMehtod(expectedResult);

				assert.notDeepEqual(promise.then, undefined);

				return promise.then((actualResult: any) => {
					assert.deepEqual(actualResult, expectedResult);
				});
			});
开发者ID:NativeScript,项目名称:nativescript-cli,代码行数:9,代码来源:decorators.ts

示例5: it

		it("should return correct value from json file if found in client json before common json", () => {
			const commonJsonContents = {
				KEY: "Value"
			},
				clientJsonContents = {
					KEY: "Overriden value"
				},
				pathToDefaultMessageJson = join(__dirname, "..", "..", "resources", "messages", "errorMessages.json"),
				injector = createTestInjector({});

			injector.register("fs", {
				exists: (path: string): boolean => true,
				readJson: (filename: string, encoding?: string): any => filename === pathToDefaultMessageJson ? commonJsonContents : clientJsonContents
			});
			service = injector.resolve("$messagesService");
			service.pathsToMessageJsonFiles = ["clientJsonFile.json"];

			assert.notDeepEqual(commonJsonContents.KEY, service.getMessage("KEY"), "Messages service should return correct value from json file when value is overriden by client.");
			assert.deepEqual(clientJsonContents.KEY, service.getMessage("KEY"), "Messages service should return correct value from json file when value is overriden by client.");
		});
开发者ID:NativeScript,项目名称:nativescript-cli,代码行数:20,代码来源:messages-service.ts

示例6: it

 it('should successfully override nested enum config without changing the default', () => {
   assert.deepEqual(extendedOpt.enum.binProps.maxbins, [100,200]);
   assert.notDeepEqual(extendedOpt.enum.binProps.maxbins, DEFAULT_QUERY_CONFIG.enum.binProps.maxbins);
 });
开发者ID:herrstucki,项目名称:compassql,代码行数:4,代码来源:config.test.ts


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