mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-29 12:01:32 +02:00
[web] Convert remaining chat frontend and tests to typescript GitOrigin-RevId: 6b2b485433e0a4530f00496e7ecdd49d9eb450af
16 lines
333 B
TypeScript
16 lines
333 B
TypeScript
import sinon from 'sinon'
|
|
|
|
export function stubMathJax() {
|
|
window.MathJax = {
|
|
Hub: {
|
|
Queue: sinon.stub(),
|
|
config: { tex2jax: { inlineMath: [['$', '$']] } },
|
|
},
|
|
}
|
|
}
|
|
|
|
export function tearDownMathJaxStubs() {
|
|
// @ts-expect-error - this is a stub that we're setting ourselves per test
|
|
delete window.MathJax
|
|
}
|