stubs.js 256 B

1234567891011121314
  1. import sinon from 'sinon'
  2. export function stubMathJax() {
  3. window.MathJax = {
  4. Hub: {
  5. Queue: sinon.stub(),
  6. config: { tex2jax: { inlineMath: [['$', '$']] } },
  7. },
  8. }
  9. }
  10. export function tearDownMathJaxStubs() {
  11. delete window.MathJax
  12. }