UNPKG

openlayers

Version:

Build tools and sources for developing OpenLayers based mapping applications

32 lines (22 loc) 792 B
goog.provide('ol.test.style.Text'); goog.require('ol.style.Fill'); goog.require('ol.style.Text'); describe('ol.style.Text', function() { describe('#constructor', function() { it('uses a default fill style if none passed', function() { var style = new ol.style.Text(); expect(style.getFill().getColor()).to.be('#333'); }); it('uses a provided fill style if one passed', function() { var style = new ol.style.Text({ fill: new ol.style.Fill({color: '#123456'}) }); expect(style.getFill().getColor()).to.be('#123456'); }); it('can always be resetted to no color', function() { var style = new ol.style.Text(); style.getFill().setColor(); expect(style.getFill().getColor()).to.be(undefined); }); }); });