mediawiki-extensions-Popups/tests/node-qunit/wait.test.js
James D. Forrester 14c2102476 build: Upgrade eslint-config-wikimedia from 0.17.0 to 0.20.0
Some inline compatibility queries for the maintainers, where it
wasn't obviously intentional.

Change-Id: Idd659a0a0f7fb86c3f6870b8fe4608bbf8a45f05
2021-05-03 12:31:52 -07:00

11 lines
291 B
JavaScript

import wait from '../../src/wait';
QUnit.module( 'ext.popups/wait' );
QUnit.test( 'it should resolve after waiting', function ( assert ) {
const then = Date.now();
return wait( 150 ).then( () => {
assert.ok( ( Date.now() - then ) > 150, 'It waits for the given duration' );
} );
} );