mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-12 16:43:23 -05:00
24 lines
538 B
TypeScript
24 lines
538 B
TypeScript
|
const MATHJAX_STUB = `
|
||
|
window.MathJax = {
|
||
|
startup: {
|
||
|
promise: Promise.resolve()
|
||
|
},
|
||
|
svgStylesheet: () => document.createElement("STYLE")
|
||
|
}
|
||
|
`
|
||
|
|
||
|
export const interceptMathJax = () => {
|
||
|
cy.window().then(win => {
|
||
|
win.metaAttributesCache.set(
|
||
|
'ol-mathJax3Path',
|
||
|
'https://unpkg.com/mathjax@3.2.2/es5/tex-svg-full.js'
|
||
|
)
|
||
|
})
|
||
|
cy.intercept('GET', '/js/libs/mathjax3/es5/tex-svg-full.js*', MATHJAX_STUB)
|
||
|
cy.intercept(
|
||
|
'GET',
|
||
|
'https://unpkg.com/mathjax@3.2.2/es5/tex-svg-full.js',
|
||
|
MATHJAX_STUB
|
||
|
)
|
||
|
}
|