Apply automatic eslint fixes
This commit is contained in:
@@ -5,9 +5,8 @@ require('../support/test-helper');
|
||||
var assert = require('../support/assert');
|
||||
var TestClient = require('../support/test-client');
|
||||
|
||||
describe('sql-wrap', function() {
|
||||
|
||||
afterEach(function(done) {
|
||||
describe('sql-wrap', function () {
|
||||
afterEach(function (done) {
|
||||
if (this.testClient) {
|
||||
this.testClient.drain(done);
|
||||
} else {
|
||||
@@ -15,40 +14,39 @@ describe('sql-wrap', function() {
|
||||
}
|
||||
});
|
||||
|
||||
it('should use sql_wrap from layer options', function(done) {
|
||||
it('should use sql_wrap from layer options', function (done) {
|
||||
var mapConfig = {
|
||||
version: '1.5.0',
|
||||
layers: [
|
||||
{
|
||||
"type": "cartodb",
|
||||
"options": {
|
||||
"sql": "SELECT * FROM populated_places_simple_reduced",
|
||||
"sql_wrap": "SELECT * FROM (<%= sql %>) _w WHERE adm0_a3 = 'USA'",
|
||||
"cartocss": [
|
||||
"#points {",
|
||||
" marker-fill-opacity: 1;",
|
||||
" marker-line-color: #FFF;",
|
||||
" marker-line-width: 0.5;",
|
||||
" marker-line-opacity: 1;",
|
||||
" marker-placement: point;",
|
||||
" marker-type: ellipse;",
|
||||
" marker-width: 8;",
|
||||
" marker-fill: red;",
|
||||
" marker-allow-overlap: true;",
|
||||
"}"
|
||||
type: 'cartodb',
|
||||
options: {
|
||||
sql: 'SELECT * FROM populated_places_simple_reduced',
|
||||
sql_wrap: "SELECT * FROM (<%= sql %>) _w WHERE adm0_a3 = 'USA'",
|
||||
cartocss: [
|
||||
'#points {',
|
||||
' marker-fill-opacity: 1;',
|
||||
' marker-line-color: #FFF;',
|
||||
' marker-line-width: 0.5;',
|
||||
' marker-line-opacity: 1;',
|
||||
' marker-placement: point;',
|
||||
' marker-type: ellipse;',
|
||||
' marker-width: 8;',
|
||||
' marker-fill: red;',
|
||||
' marker-allow-overlap: true;',
|
||||
'}'
|
||||
].join('\n'),
|
||||
"cartocss_version": "2.3.0"
|
||||
cartocss_version: '2.3.0'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.testClient = new TestClient(mapConfig, 1234);
|
||||
this.testClient.getTile(0, 0, 0, function(err, tile, img) {
|
||||
this.testClient.getTile(0, 0, 0, function (err, tile, img) {
|
||||
assert.ok(!err, err);
|
||||
var fixtureImg = './test/fixtures/sql-wrap-usa-filter.png';
|
||||
assert.imageIsSimilarToFile(img, fixtureImg, 20, done);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user