UNPKG

ca-apm-probe

Version:

CA APM Node.js Agent monitors real-time health and performance of Node.js applications

50 lines (43 loc) 2.04 kB
/** * Copyright (c) 2015 CA. All rights reserved. * * This software and all information contained therein is confidential and proprietary and * shall not be duplicated, used, disclosed or disseminated in any way except as authorized * by the applicable license agreement, without the express written permission of CA. All * authorized reproductions must be marked with this language. * * EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO THE EXTENT * PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS SOFTWARE WITHOUT WARRANTY * OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL CA BE * LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR * INDIRECT, FROM THE USE OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, LOST * PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS * EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. */ 'use strict'; var coridgenerator = require('../lib/utils/coridgenerator'); var assert = require('assert'); describe('CoridGenerator', function() { describe('.generateCorIdObj()', function() { it('should return valid corid', function() { assert.notEqual(coridgenerator.generateCorIdObj(), null, 'corid obj is null'); assert.notEqual(coridgenerator.generateCorIdObj(), undefined, 'corid obj is undefined'); }); it('corid object should be of type object', function() { assert.strictEqual(typeof coridgenerator.generateCorIdObj(), 'object'); }); }); }); describe('CorrelationId', function() { describe('.getOutgoingCorId()', function() { var obj = coridgenerator.generateCorIdObj(); it('should return valid outgoing corid', function() { assert.notEqual(obj.getOutgoingCorId(), null, 'outgoing corid is null'); assert.notEqual(obj.getOutgoingCorId(), undefined, 'outgoing corid is undefined'); }); it('outgoing corid should be of type string', function() { assert.strictEqual(typeof obj.getOutgoingCorId(), 'string'); }); }); });