mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #31493 -- Replaced var with const and let keywords in JavaScript.
The eslint configuration and the admin script compress.py have been updated for ES6. The unused fallback of globals.django in jquery.init.js was removed. It is always included before jsi18n-mocks.test.js and it always sets the global value.
This commit is contained in:
parent
0dafadadb9
commit
5d37cc703b
30 changed files with 401 additions and 406 deletions
|
@ -5,14 +5,14 @@
|
|||
QUnit.module('admin.SelectBox');
|
||||
|
||||
QUnit.test('init: no options', function(assert) {
|
||||
var $ = django.jQuery;
|
||||
const $ = django.jQuery;
|
||||
$('<select id="id"></select>').appendTo('#qunit-fixture');
|
||||
SelectBox.init('id');
|
||||
assert.equal(SelectBox.cache.id.length, 0);
|
||||
});
|
||||
|
||||
QUnit.test('filter', function(assert) {
|
||||
var $ = django.jQuery;
|
||||
const $ = django.jQuery;
|
||||
$('<select id="id"></select>').appendTo('#qunit-fixture');
|
||||
$('<option value="0">A</option>').appendTo('#id');
|
||||
$('<option value="1">B</option>').appendTo('#id');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue