2025-04-24 13:11:28 +08:00

15 lines
256 B
JavaScript

import sinon from 'sinon'
export function stubMathJax() {
window.MathJax = {
Hub: {
Queue: sinon.stub(),
config: { tex2jax: { inlineMath: [['$', '$']] } },
},
}
}
export function tearDownMathJaxStubs() {
delete window.MathJax
}