Added regression test for turbo-cartocss' integration
This commit is contained in:
parent
c6fbb08c8f
commit
a0073da4b3
@ -36,11 +36,10 @@ TurboCartocssAdapter.prototype._parseCartoCss = function (username, layer, callb
|
||||
}
|
||||
|
||||
this.turboCartocssParser.process(username, layer.options.cartocss, layer.options.sql, function (err, cartocss) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
// Ignore turbo-cartocss errors and continue
|
||||
if (!err && cartocss) {
|
||||
layer.options.cartocss = cartocss;
|
||||
}
|
||||
|
||||
callback(null, layer);
|
||||
});
|
||||
|
@ -71,8 +71,8 @@ describe('tests from old api translated to multilayer', function() {
|
||||
},
|
||||
function(res) {
|
||||
var parsed = JSON.parse(res.body);
|
||||
assert.ok(parsed.errors[0]);
|
||||
assert.ok(parsed.errors[0].match(/Unclosed block/));
|
||||
assert.ok(parsed.errors[0].match(/^style0/));
|
||||
assert.ok(parsed.errors[0].match(/missing closing/));
|
||||
done();
|
||||
}
|
||||
);
|
||||
|
@ -31,9 +31,8 @@ function makeMapconfig(cartocss) {
|
||||
};
|
||||
}
|
||||
|
||||
describe.skip('turbo-cartocss regressions', function() {
|
||||
describe('turbo-cartocss regressions', function() {
|
||||
|
||||
it('should accept // comments', function(done) {
|
||||
var cartocss = [
|
||||
"/** simple visualization */",
|
||||
"",
|
||||
@ -58,8 +57,17 @@ describe.skip('turbo-cartocss regressions', function() {
|
||||
"",
|
||||
"}"
|
||||
].join('\n');
|
||||
var testClient = new TestClient(makeMapconfig(cartocss));
|
||||
testClient.createLayergroup(function(err) {
|
||||
|
||||
beforeEach(function () {
|
||||
this.testClient = new TestClient(makeMapconfig(cartocss));
|
||||
});
|
||||
|
||||
afterEach(function (done) {
|
||||
this.testClient.drain(done);
|
||||
});
|
||||
|
||||
it('should accept // comments', function(done) {
|
||||
this.testClient.getTile(0, 0, 0, function(err) {
|
||||
assert.ok(!err, err);
|
||||
done();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user