Ejemplo n.º 1
0
    it('should be able create content item without argument', function() {
        var svgo = new SVGO();
        var item = svgo.createContentItem();

        item.should.be.an.Object.and.an.instanceof(JSAPI);
        item.should.be.empty;
    });
Ejemplo n.º 2
0
    it('should be able to create content item', function() {
        var svgo = new SVGO();
        var item = svgo.createContentItem({
            elem: 'elementName',
            prefix: 'prefixName',
            local: 'localName'
        });

        item.should.be.an.Object.and.an.instanceof(JSAPI);
        item.should.have.ownProperty('elem').equal('elementName');
        item.should.have.ownProperty('prefix').equal('prefixName');
        item.should.have.ownProperty('local').equal('localName');
    });