2020-10-27 06:52:40 -04:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2020-11-24 06:58:08 -05:00
|
|
|
export function stubChatStore({ user }) {
|
2020-10-27 06:52:40 -04:00
|
|
|
window.user = user
|
|
|
|
}
|
|
|
|
|
2020-11-24 06:58:08 -05:00
|
|
|
export function tearDownChatStore() {
|
2020-10-27 06:52:40 -04:00
|
|
|
delete window.user
|
|
|
|
}
|