Skip to content

Commit

Permalink
Merge pull request #120 from MailOnline/next-release
Browse files Browse the repository at this point in the history
Next release
  • Loading branch information
carpasse authored Dec 10, 2018
2 parents 81d3eb5 + 27fe4ed commit bb0c49a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/vastSelectors/__tests__/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ test('getVastErrorURI must return the error uri of the VAST element', () => {

test('getAds must return the ads of the passed adResponse or null otherwise', () => {
expect(getAds(wrapperParsedXML)).toEqual([wrapperAd]);
expect(getAds(noAdParsedXML)).toBe(null);
expect(getAds({})).toBe(null);
expect(getAds(null)).toBe(null);
expect(getAds()).toBe(null);
expect(getAds(noAdParsedXML)).toEqual([]);
expect(getAds({})).toEqual([]);
expect(getAds(null)).toEqual([]);
expect(getAds()).toEqual([]);
});

test('getFirstAd must return the first ad of the passed adResponse or null otherwise', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/vastSelectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const compareBySequence = (itemA, itemB) => {
*
* @function
* @param {ParsedVast} parsedVAST - Parsed VAST xml.
* @returns {?Array} - Array of ads or `null`.
* @returns {?Array} - Array of ads or empty array.
* @static
* @ignore
*/
Expand All @@ -52,7 +52,7 @@ export const getAds = (parsedVAST) => {
return ads;
}

return null;
return [];
};

/**
Expand Down

0 comments on commit bb0c49a

Please sign in to comment.