|
|
@@ -17,6 +17,13 @@ const chai = require('chai')
|
|
|
chai.use(require('sinon-chai'))
|
|
|
chai.use(require('chai-as-promised'))
|
|
|
|
|
|
+// Mock global settings
|
|
|
+window.ExposedSettings = {
|
|
|
+ appName: 'Overleaf',
|
|
|
+ maxEntitiesPerProject: 10,
|
|
|
+ maxUploadSize: 5 * 1024 * 1024
|
|
|
+}
|
|
|
+
|
|
|
window.i18n = { currentLangCode: 'en' }
|
|
|
require('../../frontend/js/i18n')
|
|
|
|
|
|
@@ -51,13 +58,6 @@ Object.defineProperty(global, 'localStorage', {
|
|
|
const fetch = require('node-fetch')
|
|
|
global.fetch = (url, ...options) => fetch('http://localhost' + url, ...options)
|
|
|
|
|
|
-// Mock global settings
|
|
|
-window.ExposedSettings = {
|
|
|
- appName: 'Overleaf',
|
|
|
- maxEntitiesPerProject: 10,
|
|
|
- maxUploadSize: 5 * 1024 * 1024
|
|
|
-}
|
|
|
-
|
|
|
// ignore CSS files
|
|
|
const { addHook } = require('pirates')
|
|
|
addHook(() => '', { exts: ['.css'], ignoreNodeModules: false })
|