• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript should.not类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中should.not的典型用法代码示例。如果您正苦于以下问题:TypeScript not类的具体用法?TypeScript not怎么用?TypeScript not使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: it

    it("AddressSpace#deleteNode - should remove an object and its children from the address space", () => {

        const options = {
            browseName: "SomeObject",
            organizedBy: "ObjectsFolder",
        };
        const object = namespace.addObject(options);
        const innerVar = namespace.addVariable({componentOf: object, browseName: "Hello", dataType: "String"});

        // objects shall  be found with a global nodeId search
        addressSpace.findNode(object.nodeId)!.should.eql(object);
        addressSpace.findNode(innerVar.nodeId)!.should.eql(innerVar);

        let references = object.findReferences("HasComponent", true);
        findReference(references, innerVar.nodeId).length.should.eql(1);

        const rootFolder = addressSpace.rootFolder;
        references = rootFolder.objects.findReferences("Organizes", true);
        findReference(references, object.nodeId).length.should.eql(1);

        // ---------------------------------------------------------
        addressSpace.deleteNode(object.nodeId);
        // ---------------------------------------------------------

        // object shall not be found with a global nodeId search
        should.not.exist(addressSpace.findNode(object.nodeId));
        should.not.exist(addressSpace.findNode(innerVar.nodeId));

        references = rootFolder.findReferences("Organizes", true);
        findReference(references, object.nodeId).length.should.eql(0);

    });
开发者ID:node-opcua,项目名称:node-opcua,代码行数:32,代码来源:test_address_space.ts


示例2: it

    it("should be possible to remove a reference ", () => {

        const boiler = boilerType.instantiate({
            browseName: "Boiler#1",
            nodeId: "ns=1;s=MyBoiler"
        });

        boiler.nodeId.toString().should.eql("ns=1;s=MyBoiler");

        const componentsBefore = boiler.getComponents().map((x: BaseNode) => x.browseName.toString());

        // xx console.log(componentsBefore.join(" "));

        componentsBefore.indexOf("1:PipeX001").should.be.aboveOrEqual(0);

        boiler.removeReference({ referenceType: "HasComponent", nodeId: boiler.pipeX001.nodeId });
        const componentsAfter = boiler.getComponents().map((x: BaseNode) => x.browseName.toString());
        // xx console.log(componentsAfter.join(" "));

        componentsAfter.indexOf("1:PipeX001").should.eql(-1);

        should.not.exist(boiler.pipeX001);

        boiler.removeReference({ referenceType: "HasComponent", nodeId: boiler.pipeX002.nodeId });
        should.not.exist(boiler.pipeX002);

    });
开发者ID:node-opcua,项目名称:node-opcua,代码行数:27,代码来源:test_issue_435_removeReference.ts


示例3: done

 .end(function (err, res) {
     should.not.exist(err);
     should.not.exist(res.header['x-ms-doc-id']);
     res.body.Documents[0].id.should.equal('test-query');
     res.body['isquery'].should.equal(true);
     res.body['content-type'].should.equal('application/query+json');
     done();
 });
开发者ID:jeffhollan,项目名称:docdb-connector,代码行数:8,代码来源:document_test.ts


示例4: it

        it("should instantiate an AlarmConditionType", () => {

            const alarmConditionType = addressSpace.findEventType("AlarmConditionType")!;
            const alarm = alarmConditionType.instantiate({
                browseName: "AlarmCondition1",
                componentOf: source,
                conditionSource: source
            });
            alarm.browseName.toString().should.eql("1:AlarmCondition1");

            should.not.exist((alarm as any).maxTimedShelved);
            should.not.exist((alarm as any).confirmedState);
        });
开发者ID:node-opcua,项目名称:node-opcua,代码行数:13,代码来源:utest_alarm_condition.ts


示例5: it

		it('should remove a key value', async () => {

			await client.del('test1');
			const val = await client.get('test1');
			should.not.exist(val);

		});
开发者ID:AdExchangeGrp,项目名称:aeg-redis,代码行数:7,代码来源:index.integration.test.ts


示例6: it

        it("HRRM-6 should return some data if endTime & numValuesPerNode, are specified (no startTime)", async () => {

            const indexRange = null;
            const dataEncoding = null;
            const historyReadDetails = new ReadRawModifiedDetails({
                endTime: date_add(today, { seconds: +1000000 }),
                isReadModified: false,
                numValuesPerNode: 10000, /// Max
                returnBounds: false,
                startTime: undefined
            });

            const historyReadResult1 = await node.historyRead(
              context, historyReadDetails, indexRange, dataEncoding);

            const dataValues = (historyReadResult1.historyData as HistoryData).dataValues!;
            dataValues.length.should.eql(7);
            should.not.exist(historyReadResult1.continuationPoint, "expecting no continuation points in our case");

            dataValues[6].sourceTimestamp!.should.eql(date_add(today, { seconds: 0 }));
            dataValues[5].sourceTimestamp!.should.eql(date_add(today, { seconds: 1 * 60 }));
            dataValues[4].sourceTimestamp!.should.eql(date_add(today, { seconds: 2 * 60 }));
            dataValues[3].sourceTimestamp!.should.eql(date_add(today, { seconds: 3 * 60 }));
            dataValues[2].sourceTimestamp!.should.eql(date_add(today, { seconds: 4 * 60 }));
            dataValues[1].sourceTimestamp!.should.eql(date_add(today, { seconds: 5 * 60 }));
            dataValues[0].sourceTimestamp!.should.eql(date_add(today, { seconds: 6 * 60 }));

        });
开发者ID:node-opcua,项目名称:node-opcua,代码行数:28,代码来源:test_address_space_historical_data_node.ts


示例7:

 [generatedAddress, generatedTestAddress].forEach((currentAddress) => {
   currentAddress.chain.should.equal(1);
   currentAddress.index.should.equal(113);
   currentAddress.coinSpecific.outputScript.should.equal('a91443457880e5e29555d6ad16bc82ef53891d6512b087');
   currentAddress.coinSpecific.redeemScript.should.equal('522103dc94182103c93690c2bca3fe013c19c956b940645b11b0a752e0e56b156bf4e22103b5f4aa0348bf339400ed7e16c6e960a4a46a1ea4c4cbe21abf6d0403161dc4f22103706ff6b11a8d9e3d63a455788d5d96738929ca642f1f3d8f9acedb689e759f3753ae');
   should.not.exist(currentAddress.coinSpecific.witnessScript);
 });
开发者ID:BitGo,项目名称:BitGoJS,代码行数:7,代码来源:btc.ts


示例8: it

 it('should return the version of the package and nodejs', async function version() {
   validate = function (msg: any, eventName: string): void {
     eventName.should.equal('versionResponse');
     should.exist(msg.services);
     msg.services.should.containEql('commandinterface');
     should.exist(msg.payload);
     const payload = decodeMsg(msg.payload);
     should.exist(payload.version);
     payload.version.should.equal(process.env.npm_package_version);
     should.exist(payload.nodejs);
     payload.nodejs.should.equal(process.version);
   };
   const offset = await commandTopic.$offset(-1);
   const resp = await service.command({
     name: 'version',
   });
   await commandTopic.$wait(offset);
   should.not.exist(resp.error);
   should.exist(resp.data);
   const data = decodeMsg(resp.data);
   should.exist(data.version);
   data.version.should.equal(process.env.npm_package_version);
   should.exist(data.nodejs);
   data.nodejs.should.equal(process.version);
 });
开发者ID:restorecommerce,项目名称:chassis-srv,代码行数:25,代码来源:command_test.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript as-function.as-function函数代码示例发布时间:2022-05-25
下一篇:
TypeScript should.exist函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap