-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changes to issue #1558 regarding failed Jest test cases #1577
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
'use strict' | ||
// // This is a custom Jest transformer turning style imports into empty objects. | ||
// // http://facebook.github.io/jest/docs/en/webpack.html | ||
|
||
// This is a custom Jest transformer turning style imports into empty objects. | ||
// http://facebook.github.io/jest/docs/en/webpack.html | ||
// const cssTransform = { | ||
// process() { | ||
// return 'module.exports = {};'; | ||
// }, | ||
// getCacheKey() { | ||
// // The output is always the same. | ||
// return 'cssTransform'; | ||
// } | ||
// }; | ||
|
||
const babelJest = require('babel-jest'); | ||
|
||
// Export the transformer function | ||
module.exports = { | ||
process () { | ||
return 'module.exports = {};' | ||
process(src, filename, config, options) { | ||
return babelJest.process(src, filename, config, options); | ||
}, | ||
getCacheKey () { | ||
// The output is always the same. | ||
return 'cssTransform' | ||
} | ||
} | ||
'type': 'module', | ||
extensionsToTreatAsEsm: ['.js', '.jsx'] | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import * as d3 from 'd3' | ||
import * as d3 from 'd3/dist/d3.min' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't feel we import things from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of the imports in the project we use |
||
import { adjustViewport } from '../../util/chart' | ||
import { roundToXDecimals } from '../../util/math' | ||
import { siteTheme } from '../../globals' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ const mylaGlobals = mylaGlobalsEl ? JSON.parse(mylaGlobalsEl.textContent) : {} | |
|
||
let cspNonce | ||
const cspMetaEl = document.querySelector('meta[name="csp-nonce"]') | ||
if (cspMetaEl !== null & cspMetaEl.hasAttribute('content')) { | ||
if (cspMetaEl !== null && cspMetaEl.hasAttribute('content')) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Undo the change here as I don't feel this needed any change |
||
cspNonce = cspMetaEl.getAttribute('content') | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should always remove commented code , if not used