overleaf/services/web/test/frontend/bootstrap.js
Miguel Serrano df37668180 Merge pull request #3267 from overleaf/msm-react-chat-tests
React chat tests

GitOrigin-RevId: e3b4d5b7cb2657d9aad7e1006c18db4e6c0d8a3f
2020-10-28 03:04:53 +00:00

25 lines
680 B
JavaScript

// Run babel on tests to allow support for import/export statements in Node
require('@babel/register')
// Load JSDOM to mock the DOM in Node
require('jsdom-global/register')
// Load sinon-chai assertions so expect(stubFn).to.have.been.calledWith('abc')
// has a nicer failure messages
const chai = require('chai')
chai.use(require('sinon-chai'))
window.i18n = { currentLangCode: 'en' }
require('../../frontend/js/i18n')
const moment = require('moment')
moment.updateLocale('en', {
calendar: {
lastDay: '[Yesterday]',
sameDay: '[Today]',
nextDay: '[Tomorrow]',
lastWeek: 'ddd, Do MMM YY',
nextWeek: 'ddd, Do MMM YY',
sameElse: 'ddd, Do MMM YY'
}
})