@@ -2,13 +2,13 @@ import { parseCreativeCompanion } from '../src/parser/creative_companion_parser'
2
2
import { getNodesFromXml } from './utils/utils' ;
3
3
import { companionAds } from './samples/companion_ads' ;
4
4
5
- describe ( 'parseCreativeCompanion' , function ( ) {
5
+ describe ( 'parseCreativeCompanion' , function ( ) {
6
6
const creativeElement = getNodesFromXml ( companionAds ) ;
7
7
const creativeAttributes = {
8
8
id : '1' ,
9
9
adId : '1234' ,
10
10
sequence : '1' ,
11
- apiFramework : null
11
+ apiFramework : null ,
12
12
} ;
13
13
let creative = null ;
14
14
@@ -25,7 +25,7 @@ describe('parseCreativeCompanion', function() {
25
25
id : '1' ,
26
26
adId : '1234' ,
27
27
sequence : '1' ,
28
- apiFramework : null
28
+ apiFramework : null ,
29
29
} ) ;
30
30
} ) ;
31
31
@@ -55,20 +55,20 @@ describe('parseCreativeCompanion', function() {
55
55
apiFramework : 'VPAID' ,
56
56
adSlotID : '1' ,
57
57
pxratio : '2' ,
58
- renderingMode : 'end-card'
58
+ renderingMode : 'end-card' ,
59
59
} ) ;
60
60
} ) ;
61
61
62
62
it ( 'gets the static resources and their creative types' , ( ) => {
63
63
expect ( companion . staticResources ) . toEqual ( [
64
64
{
65
65
url : 'http://example.com/companion1-static-resource1' ,
66
- creativeType : 'image/jpeg'
66
+ creativeType : 'image/jpeg' ,
67
67
} ,
68
68
{
69
69
url : 'http://example.com/companion1-static-resource2' ,
70
- creativeType : 'image/jpeg'
71
- }
70
+ creativeType : 'image/jpeg' ,
71
+ } ,
72
72
] ) ;
73
73
expect ( companion . iframeResources ) . toEqual ( [ ] ) ;
74
74
expect ( companion . htmlResources ) . toEqual ( [ ] ) ;
@@ -80,7 +80,7 @@ describe('parseCreativeCompanion', function() {
80
80
81
81
it ( 'gets tracking events' , ( ) => {
82
82
expect ( companion . trackingEvents ) . toEqual ( {
83
- creativeView : [ 'http://example.com/companion1-creativeview' ]
83
+ creativeView : [ 'http://example.com/companion1-creativeview' ] ,
84
84
} ) ;
85
85
} ) ;
86
86
@@ -94,12 +94,12 @@ describe('parseCreativeCompanion', function() {
94
94
expect ( companion . companionClickTrackingURLTemplates ) . toEqual ( [
95
95
{
96
96
id : '1' ,
97
- url : 'http://example.com/companion1-clicktracking-first'
97
+ url : 'http://example.com/companion1-clicktracking-first' ,
98
98
} ,
99
99
{
100
100
id : '2' ,
101
- url : 'http://example.com/companion1-clicktracking-second'
102
- }
101
+ url : 'http://example.com/companion1-clicktracking-second' ,
102
+ } ,
103
103
] ) ;
104
104
} ) ;
105
105
@@ -132,14 +132,14 @@ describe('parseCreativeCompanion', function() {
132
132
apiFramework : 'VPAID' ,
133
133
adSlotID : '2' ,
134
134
pxratio : '1' ,
135
- renderingMode : 'concurrent'
135
+ renderingMode : 'concurrent' ,
136
136
} ) ;
137
137
} ) ;
138
138
139
139
it ( 'gets the iframe resources' , ( ) => {
140
140
expect ( companion . staticResources ) . toEqual ( [ ] ) ;
141
141
expect ( companion . iframeResources ) . toEqual ( [
142
- 'http://www.example.com/companion2-example.php'
142
+ 'http://www.example.com/companion2-example.php' ,
143
143
] ) ;
144
144
expect ( companion . htmlResources ) . toEqual ( [ ] ) ;
145
145
} ) ;
@@ -150,7 +150,7 @@ describe('parseCreativeCompanion', function() {
150
150
151
151
it ( 'gets tracking events' , ( ) => {
152
152
expect ( companion . trackingEvents ) . toEqual ( {
153
- creativeView : [ 'http://example.com/companion2-creativeview' ]
153
+ creativeView : [ 'http://example.com/companion2-creativeview' ] ,
154
154
} ) ;
155
155
} ) ;
156
156
@@ -193,15 +193,15 @@ describe('parseCreativeCompanion', function() {
193
193
apiFramework : 'VPAID' ,
194
194
adSlotID : '3' ,
195
195
pxratio : '1' ,
196
- renderingMode : 'default'
196
+ renderingMode : 'default' ,
197
197
} ) ;
198
198
} ) ;
199
199
200
200
it ( 'gets the html resources' , ( ) => {
201
201
expect ( companion . staticResources ) . toEqual ( [ ] ) ;
202
202
expect ( companion . iframeResources ) . toEqual ( [ ] ) ;
203
203
expect ( companion . htmlResources ) . toEqual ( [
204
- '<a href="http://www.example.com" target="_blank">Some call to action HTML!</a>'
204
+ '<a href="http://www.example.com" target="_blank">Some call to action HTML!</a>' ,
205
205
] ) ;
206
206
} ) ;
207
207
@@ -211,7 +211,7 @@ describe('parseCreativeCompanion', function() {
211
211
212
212
it ( 'gets tracking events' , ( ) => {
213
213
expect ( companion . trackingEvents ) . toEqual ( {
214
- creativeView : [ 'http://example.com/companion3-creativeview' ]
214
+ creativeView : [ 'http://example.com/companion3-creativeview' ] ,
215
215
} ) ;
216
216
} ) ;
217
217
0 commit comments