mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #31493 -- Replaced var with const/let in documentation JS.
This commit is contained in:
committed by
Carlton Gibson
parent
30e59705fc
commit
2afa61e7d9
@@ -56,13 +56,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();
|
||||
@@ -70,7 +70,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();
|
||||
|
||||
Reference in New Issue
Block a user