Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brain committed Jan 23, 2020
1 parent 8442111 commit c75e42c
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 45 deletions.
6 changes: 5 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ module.exports = {
'react/destructuring-assignment': 'off',
'react/require-default-props': 'off',
'react/no-unused-prop-types': 'off',
'react/style-prop-object': 'off'
'react/style-prop-object': 'off',
'unicorn/prefer-negative-index': 'off',
'default-param-last': 'off',
'import/no-cycle': 'off',
'unicorn/no-for-loop': 'off'
}
};
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @flow */
/* eslint import/no-default-export: off */
/* eslint import/no-default-export: off, import/no-commonjs: off */

import { getKarmaConfig } from 'grumbler-scripts/config/karma.conf';

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"babel-core": "^7.0.0-bridge.0",
"commitizen": "^3.0.4",
"cz-conventional-changelog": "^2.1.0",
"eslint-plugin-import": "2.16.0",
"flow-bin": "^0.70.0",
"fs-extra": "^4.0.2",
"grumbler-scripts": "^3",
Expand Down
4 changes: 2 additions & 2 deletions src/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const config = {
? `//${ window.location.host }/base/src/load.js`
: `//www.paypalobjects.com/api/${ __FILE_NAME__ }`,

// eslint-disable-next-line security/detect-unsafe-regex, unicorn/no-unsafe-regex
// eslint-disable-next-line security/detect-unsafe-regex
paypal_domain_regex: /^(https?|mock):\/\/[a-zA-Z0-9_.-]+\.paypal\.com(:\d+)?$/,

version: __PAYPAL_CHECKOUT__.__MINOR_VERSION__,
Expand Down Expand Up @@ -780,7 +780,7 @@ export const config = {

loggerUri: `/xoplatform/logger/api/logger`,

loggerThrottlePercentage: 1.0, // 100%
loggerThrottlePercentage: 1, // 100%

pptmUri: `/tagmanager/pptm.js`,

Expand Down
2 changes: 1 addition & 1 deletion src/lib/jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function jsxToHTML(name : string, props : PropsType, ...children : Childr

export function jsxRender(template : string, renderers : { [string] : (string) =>?(JsxHTMLNode | $ReadOnlyArray<JsxHTMLNode>) }) : JsxHTMLNode {

// eslint-disable-next-line security/detect-unsafe-regex, unicorn/no-unsafe-regex
// eslint-disable-next-line security/detect-unsafe-regex
const nodes = regexMap(template, /\{\s*([a-z]+)(?::\s*([^} ]+))?\s*\}|([^${}]+)/g, (match, type, value, text) => {
if (type) {
if (!renderers[type]) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export function stringifyError(err : mixed, level : number = 1) : string {
return Object.prototype.toString.call(err);
} catch (newErr) { // eslint-disable-line unicorn/catch-error-name
} catch (newErr) {
return `Error while stringifying error: ${ stringifyError(newErr, level + 1) }`;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/loader/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function stringifyError(err : mixed, level : number = 1) : string {

return Object.prototype.toString.call(err);

} catch (newErr) { // eslint-disable-line unicorn/catch-error-name
} catch (newErr) {
return `Error while stringifying error: ${ stringifyError(newErr, level + 1) }`;
}
}
4 changes: 2 additions & 2 deletions src/resources/fundingLogos/eps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export function epsLogo({ logoColor } : { logoColor : $Values<typeof BUTTON_LOGO
<path d="M30.5274503,22.3509666 C30.5513879,22.0972668 30.4015244,21.994011 30.1526649,21.994011 C29.9278951,21.994011 29.7210277,22.0972668 29.6310082,22.3509666 L30.5274503,22.3509666 Z M29.5800901,22.6046664 C29.5680706,22.8076262 29.7269614,22.9733429 29.996817,22.9733429 C30.1467312,22.9733429 30.3445205,22.9146875 30.4524425,22.812751 L30.6203606,23.006882 C30.4375322,23.1747298 30.1676766,23.2582985 29.9398638,23.2582985 C29.5141603,23.2582985 29.2653008,23.0032288 29.2653008,22.6132922 C29.2653008,22.0943746 29.6730004,21.7076854 30.1946571,21.7076854 C30.6713801,21.7076854 30.941185,21.9957869 30.7793021,22.6046664 L29.5800901,22.6046664 Z" fill={ tertiary } />
<path d="M31.3524449,21.3412364 C31.3524449,21.4461666 31.4304449,21.5003569 31.5144293,21.5003569 C31.63432,21.5003569 31.7452342,21.4222173 31.7452342,21.2753759 C31.7452342,21.1762808 31.6702264,21.119249 31.5892849,21.119249 C31.4783707,21.119249 31.3524449,21.1913505 31.3524449,21.3412364 Z M31.625242,21.742082 L31.3645151,23.2135408 L31.0556594,23.2135408 L31.3164878,21.742082 L31.625242,21.742082 Z" fill={ tertiary } />
<path d="M32.9955925,22.1060753 C32.8996393,21.9981006 32.7767563,21.9681133 32.629885,21.9681133 C32.4259085,21.9681133 32.2820801,22.0371704 32.2820801,22.1661006 C32.2820801,22.2740753 32.398928,22.3191831 32.5728811,22.3341006 C32.8426861,22.3580499 33.1874481,22.4481133 33.1154832,22.8290182 C33.0645651,23.1049421 32.7887251,23.266904 32.4049631,23.266904 C32.1651815,23.266904 31.9342752,23.2129167 31.7784273,22.9939738 L31.9792596,22.7750309 C32.0901737,22.9279104 32.2850723,22.9909801 32.4589241,22.9939738 C32.6057953,22.9939738 32.7797485,22.9399865 32.806729,22.8020245 C32.8337095,22.6700499 32.7167602,22.619107 32.5009163,22.5979992 C32.2490645,22.5739992 31.9733259,22.481145 31.9733259,22.202126 C31.9733259,21.833145 32.3719475,21.7042148 32.6718265,21.7042148 C32.8996393,21.7042148 33.0675573,21.7551577 33.2055027,21.9022021 L32.9955925,22.1060753 Z" fill={ tertiary } />
<path d="M33.9703034,21.7420871 L33.8294672,22.534493 C33.7844828,22.7865184 33.8984399,22.9606579 34.1562254,22.9606579 C34.3990498,22.9606579 34.6059172,22.7593725 34.6478079,22.5134359 L34.7827104,21.7420871 L35.0915153,21.7420871 L34.8307884,23.2135459 L34.5519562,23.2135459 L34.5729016,23.0003366 C34.3990498,23.1652922 34.2280888,23.2430765 34.0213229,23.2430765 C33.658557,23.2430765 33.442713,22.982882 33.5206116,22.5361167 L33.6615492,21.7420871 L33.9703034,21.7420871 Z" fill={ tertiary } />
<path d="M36.4472345,23.2135459 L36.588172,22.4259603 C36.633055,22.1709412 36.5462813,22.0020279 36.2644061,22.0020279 C36.0185895,22.0020279 35.8116207,22.199863 35.7697299,22.4428059 L35.6348274,23.2135459 L35.3260225,23.2135459 L35.5869016,21.7420871 L35.8686246,21.7420871 L35.8476792,21.957123 C36.0185895,21.7981548 36.1953827,21.7197615 36.3872384,21.7197615 C36.7470121,21.7197615 36.9809614,21.9701632 36.9000199,22.4231696 L36.7590823,23.2135459 L36.4472345,23.2135459 Z" fill={ tertiary } />
<path d="M33.9703034,21.7420871 L33.8294672,22.534493 C33.7844828,22.7865184 33.8984399,22.9606579 34.1562254,22.9606579 C34.3990498,22.9606579 34.6059172,22.7593725 34.6478079,22.5134359 L34.7827104,21.7420871 L35.0915153,21.7420871 L34.8307884,23.2135459 L34.5519562,23.2135459 L34.5729016,23.0003366 C34.3990498,23.1652922 34.2280888,23.2430765 34.0213229,23.2430765 C33.658557,23.2430765 33.442713,22.982882 33.5206116,22.5361167 L33.6615492,21.7420871 L33.9703034,21.7420871 Z" fill={ tertiary } />
<path d="M36.4472345,23.2135459 L36.588172,22.4259603 C36.633055,22.1709412 36.5462813,22.0020279 36.2644061,22.0020279 C36.0185895,22.0020279 35.8116207,22.199863 35.7697299,22.4428059 L35.6348274,23.2135459 L35.3260225,23.2135459 L35.5869016,21.7420871 L35.8686246,21.7420871 L35.8476792,21.957123 C36.0185895,21.7981548 36.1953827,21.7197615 36.3872384,21.7197615 C36.7470121,21.7197615 36.9809614,21.9701632 36.9000199,22.4231696 L36.7590823,23.2135459 L36.4472345,23.2135459 Z" fill={ tertiary } />
<g transform="translate(37.174252, 21.709040)">
<mask fill={ secondary } >
<polygon points="0.0103575649 0.00128879493 1.81575683 0.00128879493 1.81575683 2.2832981 0.0103575649 2.2832981" transform="matrix(1, 0, 0, 1, 0, 0)" />
Expand Down
10 changes: 5 additions & 5 deletions src/resources/fundingLogos/payu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function payuLogo({ logoColor } : { logoColor : $Values<typeof BUTTON_LOG
const { primary, secondary, tertiary, quaternary } = PAYU_LOGO_COLORS[logoColor];

return (
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 385.6 192.4" width="70" height="32" >
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 385.6 192.4" width="70" height="32" >
<style type="text/css" />
<g>
<path
Expand Down Expand Up @@ -64,8 +64,8 @@ export function payuLogo({ logoColor } : { logoColor : $Values<typeof BUTTON_LOG
<g >

<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-487.0462" y1="484.3289" x2="-486.0462" y2="484.3289" gradientTransform="matrix(0 146.8947 146.8947 0 -70972.5312 71622.9766)">
<stop offset="0" stop-color={ primary } />
<stop offset="1" stop-color={ secondary } />
<stop offset="0" stop-color={ primary } />
<stop offset="1" stop-color={ secondary } />
</linearGradient>
<path
style="fill:url(#SVGID_3_)" d="M178.3,192.4c-3.9,0-5.1-2.1-5.8-5.6l-0.3-1.5c-0.3-1.6-0.5-3.3,0.4-4.6c0.9-1.2,2.5-1.5,4.9-1.7
Expand All @@ -92,8 +92,8 @@ export function payuLogo({ logoColor } : { logoColor : $Values<typeof BUTTON_LOG
<g>

<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-487.0462" y1="485.4514" x2="-486.0462" y2="485.4514" gradientTransform="matrix(0 146.8947 146.8947 0 -70972.5312 71622.9766)">
<stop offset="0" stop-color={ tertiary } />
<stop offset="1" stop-color={ quaternary } />
<stop offset="0" stop-color={ tertiary } />
<stop offset="1" stop-color={ quaternary } />
</linearGradient>
<path style="fill:url(#SVGID_4_)" d="M345.6,72.6l-11.3,0c-2.5,0-4.5-2-4.5-4.5l0-20h1.6c10.4,0,14.2,1.7,14.2,11.2V72.6" />
</g>
Expand Down
Loading

0 comments on commit c75e42c

Please sign in to comment.