overleaf/services/web/test/frontend/features/chat/components/stubs.js
Jakob Ackermann da641ba039 Merge pull request #3649 from overleaf/as-chat-test-cleanup
Chat test cleanup

GitOrigin-RevId: 4323d93f64f0e51efd2931acbc77fc9b43a216cd
2021-02-18 03:04:51 +00:00

27 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
}