mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 10:33:59 -05:00
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user