JSFiddle - React, Tailwind, and code Playground

JavaScript

import otherThing from '../src/js/otherThing';
import * as utils from '../src/js/utils';

import {expect} from 'chai';
import {stub} from 'sinon';

describe('Some suite', () => {
	it('should add two numbers', () => {
  	stub(utils, 'add').callsFake((a,b) => a*b);
    
    //This should fail, internally this call utils.add(1,2)
    expect(otherThing.add(1,2)).to.equal(3);
  });
});