UNPKG

app-decorators

Version:

Collection of useful ES7 Decorators, writtin in ES6, that can be used for building webapps

42 lines (31 loc) 1.26 kB
System.register(['app-decorators/src/libs/element-to-function', '../../src/helpers/namespace'], function (_export, _context) { "use strict"; var _elementToFunc, namespace; return { setters: [function (_appDecoratorsSrcLibsElementToFunction) { _elementToFunc = _appDecoratorsSrcLibsElementToFunction.default; }, function (_srcHelpersNamespace) { namespace = _srcHelpersNamespace.namespace; }], execute: function () { describe('namespace', function () { describe('create method', function () { it('should create namespace object by passed target and namespace_string', function () { var target = {}; target = namespace.create(target, 'a.b.c'); target = namespace.create(target, 'a.b.d'); target.should.have.propertyByPath('a', 'b', 'c'); target.should.have.propertyByPath('a', 'b', 'd'); }); it('should create namespace object by passed target, namespace_string and add object', function () { var target = {}; target = namespace.create(target, 'a.b.d', 1234); target = namespace.create(target, 'a.b.c', 5678); target.should.have.containEql({ a: { b: { c: 5678, d: 1234 } } }); }); }); }); } }; }); //# sourceMappingURL=namespace.spec.js.map