Isolate reference as options test

This commit is contained in:
Raul Ochoa 2017-01-17 17:34:28 +01:00
parent 199d41f20d
commit 11ffba0a8e

View File

@ -1,6 +1,8 @@
var assert = require('assert');
var carto = require('../lib/carto');
var tree = require('../lib/carto/tree');
describe('RenderingJS', function() {
var shader;
var style = [
@ -275,12 +277,25 @@ describe('RenderingJS', function() {
}
};
describe('cartocss reference in options', function() {
before(function() {
this.referenceData = tree.Reference.data;
});
after(function() {
tree.Reference.setData(this.referenceData);
});
it('should fail if a feature is not supported', function () {
assert.throws(function () {
var RendererJS = new carto.RendererJS({reference: reference, mapnik_version: '1.0.0'});
var shader = RendererJS.render(style);
}, Error);
});
});
});
});