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


TypeScript assert.notDeepEqual函數代碼示例

本文整理匯總了TypeScript中assert.notDeepEqual函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript notDeepEqual函數的具體用法?TypeScript notDeepEqual怎麽用?TypeScript notDeepEqual使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: it

      it("not empty cases due to log level", () => {
        logObj.warn("testlogwarning");
        assert.notDeepEqual(JSON.parse(sample), "");

        logObj.error("testlogerror");
        assert.notDeepEqual(JSON.parse(sample), "");

        logObj.critical("testlogcritical");
        assert.notDeepEqual(JSON.parse(sample), "");
      });
開發者ID:Clever,項目名稱:kayvee-js,代碼行數:10,代碼來源:logger_test.ts

示例2: test

    test('different seeds produce identical sequences', function() {
        const rng1 = createRng(1),
            rng2 = createRng(2),
            sequence1 = sequence(100, rng1),
            sequence2 = sequence(100, rng2);

        assert.notDeepEqual(sequence1, sequence2);
    });
開發者ID:DirtyHairy,項目名稱:6502.ts,代碼行數:8,代碼來源:rng.ts

示例3: test

	test('schema attributes', () => {
		const schemaAttribute = adapter.getSchemaAttributes()[0];
		assert.notDeepEqual(schemaAttribute, rawAdapter.configurationAttributes);
		Object.keys(rawAdapter.configurationAttributes.launch).forEach(key => {
			assert.deepEqual(schemaAttribute[key], rawAdapter.configurationAttributes.launch[key]);
		});

		assert.equal(schemaAttribute['additionalProperties'], false);
		assert.equal(!!schemaAttribute['properties']['request'], true);
		assert.equal(!!schemaAttribute['properties']['name'], true);
		assert.equal(!!schemaAttribute['properties']['type'], true);
		assert.equal(!!schemaAttribute['properties']['preLaunchTask'], true);
	});
開發者ID:,項目名稱:,代碼行數:13,代碼來源:

示例4: it

  it("Extract Header encryption file", () => {
    let extractor = getExtractor("HeaderEnc1234.rar", "1234");
    let [state, list] = extractor.extractAll();
    assert.deepStrictEqual(state, {
      state: "SUCCESS",
    });
    assert.notDeepEqual(list, null);
    assert.deepStrictEqual(list!.files[0]!.fileHeader, {
      name: "2中文.txt",
      flags: {
        encrypted: true,
        solid: false,
        directory: false,
      },
      packSize: 32,
      unpSize: 15,
      crc: 2631402331,
      time: "2017-04-03T20:09:18.000",
      unpVer: "2.9",
      method: "Normal",
    });

    assert.deepStrictEqual(list!.files[1]!.fileHeader, {
      name: "1File.txt",
      flags: {
        encrypted: true,
        solid: false,
        directory: false,
      },
      packSize: 32,
      unpSize: 5,
      crc: 1468669977,
      time: "2017-04-03T20:08:44.000",
      unpVer: "2.9",
      method: "Normal",
    });

    assert.deepStrictEqual(list!.files[0]!.extract[0], { state: "SUCCESS" });

    assert.equal(new Buffer(list!.files[0]!.extract[1]!.subarray(0, 3)).toString("hex"), "efbbbf");
    assert.equal(new Buffer(list!.files[0]!.extract[1]!.subarray(3)).toString("utf-8"), "中文中文");
    assert.equal(new Buffer(list!.files[1]!.extract[1]!).toString("utf-8"), "1File");

  });
開發者ID:YuJianrong,項目名稱:nodejs-unrar,代碼行數:44,代碼來源:dataExtractor.spec.ts

示例5: it

 it('should copy deeply', () => {
   const structure = {
     a: 1,
     b: [1, 2],
     c: { c1: 1, c2: '2' },
     d: { d1: { d11: 'test', d12: { d123: true } } },
   };
   const obj: any = {
     a: 2,
     b: [3, 4],
     c: { c1: 2, c2: '2' },
     d: { d1: { d11: 'tes', d12: { d123: false } } },
   };
   const clone = dcp.define('test', structure);
   const newObj = clone(obj);
   assert.deepEqual(newObj, obj);
   assert.notStrictEqual(newObj, obj);
   obj.d.d11 = 'test2';
   assert.notDeepEqual(newObj, obj);
 });
開發者ID:suguru03,項目名稱:dcp,代碼行數:20,代碼來源:test.dcp.ts

示例6: test

		test('Keep hue value when saturation is 0', () => {
			assert.deepEqual(HSVA.toRGBA(new HSVA(10, 0, 0, 0)), HSVA.toRGBA(new HSVA(20, 0, 0, 0)));
			assert.deepEqual(new Color(new HSVA(10, 0, 0, 0)).rgba, new Color(new HSVA(20, 0, 0, 0)).rgba);
			assert.notDeepEqual(new Color(new HSVA(10, 0, 0, 0)).hsva, new Color(new HSVA(20, 0, 0, 0)).hsva);
		});
開發者ID:AlexxNica,項目名稱:sqlopsstudio,代碼行數:5,代碼來源:color.test.ts

示例7:

			fixResults.slice(index + 1).forEach((action2) => {
				assert.notDeepEqual(action1, action2);
			});
開發者ID:DanTup,項目名稱:Dart-Code,代碼行數:3,代碼來源:fix_code_action_provider.test.ts


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