Skip to content

Commit

Permalink
add basic tests for hidpi and placeholderTile
Browse files Browse the repository at this point in the history
  • Loading branch information
Shane98c committed Jun 17, 2023
1 parent 2050025 commit 74cdac9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/browser/spec/ol/source/BingMaps.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ describe('ol/source/BingMaps', function () {
source = new BingMaps({
imagerySet: 'AerialWithLabelsOnDemand',
key: '',
placeholderTiles: false,
hidpi: true,
});

const client = new XMLHttpRequest();
Expand Down Expand Up @@ -102,6 +104,11 @@ describe('ol/source/BingMaps', function () {
projection
);
expect(tileUrl.match(regex)[1]).to.equal(quadKey([6, 33, 22]));

const url = new URL(tileUrl);
expect(url.searchParams.get('dpi')).to.equal('d1');
expect(url.searchParams.get('device')).to.equal('mobile');
expect(url.searchParams.get('n')).to.equal('z');
});
});
});

0 comments on commit 74cdac9

Please sign in to comment.