mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-23 02:55:13 -04:00
28 lines
535 B
JavaScript
28 lines
535 B
JavaScript
|
import sinon from 'sinon'
|
||
|
|
||
|
export function stubUIConfig() {
|
||
|
window.uiConfig = {
|
||
|
chatMessageBorderSaturation: '85%',
|
||
|
chatMessageBorderLightness: '40%',
|
||
|
chatMessageBgSaturation: '85%',
|
||
|
chatMessageBgLightness: '40%'
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function tearDownUIConfigStubs() {
|
||
|
delete window.uiConfig
|
||
|
}
|
||
|
|
||
|
export function stubMathJax() {
|
||
|
window.MathJax = {
|
||
|
Hub: {
|
||
|
Queue: sinon.stub(),
|
||
|
config: { tex2jax: { inlineMath: [['$', '$']] } }
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export function tearDownMathJaxStubs() {
|
||
|
delete window.MathJax
|
||
|
}
|