UNPKG

spyne

Version:

Reactive Real-DOM Framework for Advanced Javascript applications

38 lines (24 loc) 689 B
// let getGlobalObj = constants.getGlobalObj; // import {CDN} from "../app/app-contants"; // const appConst = require("../app/app-contants.js"); // let CDN = require("../app/app-contants.js").CDN; function maybeFirst(array) { if (array && array.length) { return array[0] } } const assert = require('assert') describe('maybeFirst', function() { it('returns the first element of an array', function() { const result = maybeFirst([1, 2, 3]) assert.equal(result, 1, 'maybeFirst([1, 2, 3]) is 1') }) }) /* describe('getGlobalObj', function(){ it ('is a string ', function(){ let str = CDN; assert.isPrototypeOf(str,"String"); }) }) */