Skip to content

Commit

Permalink
eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck committed Aug 31, 2020
1 parent 11d8da4 commit 3b6e6f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion x-pack/plugins/maps/server/mvt/__tests__/tile_searches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
* you may not use this file except in compliance with the Elastic License.
*/

const search000json = require('./json/0_0_0_search.json'); // Prefer require() over setting the compiler options, which affect production modules as well
import * as path from 'path';
import * as fs from 'fs';

const search000path = path.resolve(__dirname, './json/0_0_0_search.json');
const search000raw = fs.readFileSync(search000path);
const search000json = JSON.parse(search000raw); // Prefer require() over setting the compiler options, which affect production modules as well

export const TILE_SEARCHES = {
'0.0.0': {
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/maps/server/mvt/get_tile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ describe('getTile', () => {
}

const expectedPath = path.resolve(__dirname, './__tests__/pbf/0_0_0.pbf');
const expectedTile = new Buffer(fs.readFileSync(expectedPath, 'binary'), 'binary');
const expectedBin = fs.readFileSync(expectedPath, 'binary');
const expectedTile = Buffer.from(expectedBin, 'binary');
expect(expectedTile.equals(tile)).toBe(true);
});
});

0 comments on commit 3b6e6f0

Please sign in to comment.