Skip to content

Commit

Permalink
Lint, address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danijel-ristic committed Sep 18, 2024
1 parent a5551d1 commit aa46a48
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
7 changes: 3 additions & 4 deletions extensions/amp-brid-player/0.1/amp-brid-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {assertAbsoluteHttpOrHttpsUrl} from '../../../src/url';
import {VideoEvents_Enum} from '../../../src/video-interface';

const TAG = 'amp-brid-player';
const ALIAS = 'amp-target-video-player';

/**
* @implements {../../../src/video-interface.VideoInterface}
Expand Down Expand Up @@ -494,7 +493,7 @@ class AmpBridPlayer extends AMP.BaseElement {
}
}

AMP.extension(TAG, '0.1', (AMP) => {
AMP.registerElement(TAG, AmpBridPlayer);
AMP.registerElement(ALIAS, AmpBridPlayer);
AMP.extension('amp-brid-player', '0.1', (AMP) => {
AMP.registerElement('amp-brid-player', AmpBridPlayer);
AMP.registerElement('amp-target-video-player', AmpBridPlayer);
});
19 changes: 13 additions & 6 deletions extensions/amp-brid-player/0.1/test/test-amp-brid-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ describes.realWin(
});

function getBridPlayer(attributes, opt_responsive, config, alias = false) {
const bc = alias ? doc.createElement('amp-target-video-player') : doc.createElement('amp-brid-player');
const bc = alias
? doc.createElement('amp-target-video-player')
: doc.createElement('amp-brid-player');

for (const key in attributes) {
bc.setAttribute(key, attributes[key]);
Expand Down Expand Up @@ -84,11 +86,16 @@ describes.realWin(
});

it('renders alias', () => {
return getBridPlayer({
'data-partner': '264',
'data-player': '4144',
'data-video': '13663',
}, null, null, true).then((bc) => {
return getBridPlayer(
{
'data-partner': '264',
'data-player': '4144',
'data-video': '13663',
},
null,
null,
true
).then((bc) => {
const iframe = bc.querySelector('iframe');
expect(iframe).to.not.be.null;
expect(iframe.tagName).to.equal('IFRAME');
Expand Down

0 comments on commit aa46a48

Please sign in to comment.