mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
[3.0.x] Refs #31493 -- Replaced var with const/let in documentation JS.
Backport of 2afa61e7d9
from master
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
This commit is contained in:
parent
453a5bf302
commit
af2e95b0fa
4 changed files with 33 additions and 24 deletions
|
@ -83,13 +83,13 @@ Django's JavaScript tests use `QUnit`_. Here is an example test module:
|
|||
|
||||
QUnit.module('magicTricks', {
|
||||
beforeEach: function() {
|
||||
var $ = django.jQuery;
|
||||
const $ = django.jQuery;
|
||||
$('#qunit-fixture').append('<button class="button"></button>');
|
||||
}
|
||||
});
|
||||
|
||||
QUnit.test('removeOnClick removes button on click', function(assert) {
|
||||
var $ = django.jQuery;
|
||||
const $ = django.jQuery;
|
||||
removeOnClick('.button');
|
||||
assert.equal($('.button').length, 1);
|
||||
$('.button').click();
|
||||
|
@ -97,7 +97,7 @@ Django's JavaScript tests use `QUnit`_. Here is an example test module:
|
|||
});
|
||||
|
||||
QUnit.test('copyOnClick adds button on click', function(assert) {
|
||||
var $ = django.jQuery;
|
||||
const $ = django.jQuery;
|
||||
copyOnClick('.button');
|
||||
assert.equal($('.button').length, 1);
|
||||
$('.button').click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue