Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mailonline/video-ad-sdk

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mailonline/video-ad-sdk - npm Package Compare versions

Comparing version 1.3.5 to 1.3.6

2

package.json
{
"name": "@mailonline/video-ad-sdk",
"version": "1.3.5",
"version": "1.3.6",
"description": "Video ad SDK to load and play video ads",

@@ -5,0 +5,0 @@ "keywords": [

@@ -852,2 +852,39 @@ /* eslint-disable no-loop-func, max-nested-callbacks */

test('must emit start event once', async () => {
const callback = jest.fn();
adUnit.on(start, callback);
await adUnit.start();
adUnit.creativeAd.emit(adVideoStart);
adUnit.creativeAd.emit(adVideoStart);
adUnit.creativeAd.emit(adVideoStart);
expect(callback).toHaveBeenCalledTimes(1);
});
test('must fake `adVideoStarted` on adImpression if not called already', async () => {
const callback = jest.fn();
adUnit.on(start, callback);
await adUnit.start();
adUnit.creativeAd.emit(adImpression);
expect(callback).toHaveBeenCalledTimes(1);
expect(callback).toHaveBeenCalledWith({
adUnit,
type: start
});
});
test('must not fake `adVideoStarted` on adImpression if called already', async () => {
const callback = jest.fn();
adUnit.on(start, callback);
await adUnit.start();
adUnit.creativeAd.emit(adVideoStart);
expect(callback).toHaveBeenCalledTimes(1);
adUnit.creativeAd.emit(adImpression);
expect(callback).toHaveBeenCalledTimes(1);
});
describe('paused', () => {

@@ -854,0 +891,0 @@ it('must return true if the creative is paused and false otherwise', async () => {

@@ -132,2 +132,7 @@ /* eslint-disable promise/prefer-await-to-callbacks, class-methods-use-this, import/no-named-as-default-member */

[adImpression]: () => {
// NOTE: some ads forget to trigger the adVideoStart event. :(
if (!this[_private].videoStart) {
this[_private].handleVpaidEvt(adVideoStart);
}
this.emit(impression, {

@@ -220,7 +225,10 @@ adUnit: this,

[adVideoStart]: () => {
this[_private].paused = false;
this.emit(start, {
adUnit: this,
type: start
});
if (!this[_private].videoStart) {
this[_private].videoStart = true;
this[_private].paused = false;
this.emit(start, {
adUnit: this,
type: start
});
}
},

@@ -227,0 +235,0 @@ [adVideoThirdQuartile]: () => {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc