Use URL constructor

Co-authored-by: Tim Schaub <tschaub@users.noreply.github.com>
This commit is contained in:
Andreas Hocevar
2021-11-03 08:57:48 +01:00
parent cbac16e21f
commit 1697d1b647
2 changed files with 13 additions and 10 deletions

View File

@@ -134,7 +134,7 @@ describe('ol/layer/MapboxVector', () => {
});
it('applies correct access token from url', function () {
const layer = new MapboxVectorLayer({
styleUrl: '?key=123',
styleUrl: 'foo?key=123',
});
expect(layer.accessToken).to.be('123');
expect(layer.accessTokenParam_).to.be('key');