mirror of
https://github.com/maptiler/tileserver-gl.git
synced 2024-09-11 03:55:27 +03:00
* style: fix lint issues in code 🕺
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: lint fix all files
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore: add `keywords` for better reach
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: add `husky` & `commitlint`
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore: ignore `public` directory
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* revert: do not lint `public` directory
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: fix issues with lint
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: add eslint config
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* feat: add lint-staged
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: lint fix all file(s)
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: ignore rules for light version
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* fix: remove unnecessary space
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* chore(deps): update lockfile
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
* style: autofix linting issue(s)
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
29 lines
922 B
JavaScript
29 lines
922 B
JavaScript
const testTile = function (prefix, z, x, y, status) {
|
|
const path = '/data/' + prefix + '/' + z + '/' + x + '/' + y + '.pbf';
|
|
it(path + ' returns ' + status, function (done) {
|
|
const test = supertest(app).get(path);
|
|
if (status) test.expect(status);
|
|
if (status == 200) test.expect('Content-Type', /application\/x-protobuf/);
|
|
test.end(done);
|
|
});
|
|
};
|
|
|
|
const prefix = 'openmaptiles';
|
|
|
|
describe('Vector tiles', function () {
|
|
describe('existing tiles', function () {
|
|
testTile(prefix, 0, 0, 0, 200);
|
|
testTile(prefix, 14, 8581, 5738, 200);
|
|
});
|
|
|
|
describe('non-existent requests return 4xx', function () {
|
|
testTile('non_existent', 0, 0, 0, 404);
|
|
testTile(prefix, -1, 0, 0, 404); // err zoom
|
|
testTile(prefix, 20, 0, 0, 404); // zoom out of bounds
|
|
testTile(prefix, 0, 1, 0, 404);
|
|
testTile(prefix, 0, 0, 1, 404);
|
|
|
|
testTile(prefix, 14, 0, 0, 204); // non existent tile
|
|
});
|
|
});
|