Fix CE not working without internet (#5188)

Fixes #4252
This commit is contained in:
Jeremy Rifkin
2023-06-21 12:10:55 -04:00
committed by GitHub
parent 2c60696d3d
commit 974159bdbe
2 changed files with 2 additions and 5 deletions

View File

@@ -26,7 +26,7 @@ import {assert} from 'chai';
import {isValidAd} from '../motd.js';
import {ITestable} from './frontend-testing.interfaces.js';
const stub = global.sinon.stub;
import * as sinon from '../../node_modules/sinon/pkg/sinon-esm.js';
class MotdTests implements ITestable {
public readonly description: string = 'motd';
@@ -36,7 +36,7 @@ class MotdTests implements ITestable {
}
private static assertAdWithDateNow(dateNow, ad, subLang, expected, message) {
const dateNowStub = stub(Date, 'now');
const dateNowStub = sinon.stub(Date, 'now');
dateNowStub.returns(dateNow);
MotdTests.assertAd(ad, subLang, expected, message);
dateNowStub.restore();

View File

@@ -6,9 +6,6 @@ html(lang="en")
block meta
include meta.pug
if extraBodyClass === "dev"
script(src="https://cdnjs.cloudflare.com/ajax/libs/sinon.js/14.0.0/sinon.js" integrity="sha512-lwbFZYfi3WibUQJXhehHc/gtTko1JVC38zKx2PloaZP6AIVNCk5u/GRDKwF0bHwmiQsF0r9nLF7gO9gew+1j3g==" crossorigin="anonymous" referrerpolicy="no-referrer")
script
| (function () {
| var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;