mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-12-18 10:52:27 +00:00
tests: Modernize test syntax
* Remove redundant file closure. * Remove needless QUnit.newMwEnvironment() calls as the tested methods don't alter mw.config or mw.messages. Slow, as per https://gerrit.wikimedia.org/r/c/mediawiki/core/+/912936/ Change-Id: I61bf03325d5067568d057ff2af6bf65f279a8a84
This commit is contained in:
parent
ea2e23bf54
commit
c51bb93320
|
@ -1,4 +1,4 @@
|
||||||
( function () {
|
QUnit.module( 'ext.echo.dm - NotificationItem', function ( hooks ) {
|
||||||
var fakeData = {
|
var fakeData = {
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
read: true,
|
read: true,
|
||||||
|
@ -28,11 +28,9 @@
|
||||||
var now = 1234567890000;
|
var now = 1234567890000;
|
||||||
var nowFormatted = '2009-02-13T23:31:30Z';
|
var nowFormatted = '2009-02-13T23:31:30Z';
|
||||||
|
|
||||||
QUnit.module( 'ext.echo.dm - NotificationItem', QUnit.newMwEnvironment( {
|
hooks.beforeEach( function () {
|
||||||
beforeEach: function () {
|
this.sandbox.useFakeTimers( now );
|
||||||
this.sandbox.useFakeTimers( now );
|
} );
|
||||||
}
|
|
||||||
} ) );
|
|
||||||
|
|
||||||
QUnit.test.each( 'Constructing items', {
|
QUnit.test.each( 'Constructing items', {
|
||||||
'Empty data': {
|
'Empty data': {
|
||||||
|
@ -137,4 +135,4 @@
|
||||||
);
|
);
|
||||||
} );
|
} );
|
||||||
|
|
||||||
}() );
|
} );
|
||||||
|
|
Loading…
Reference in a new issue