From 5b14f6b666734cd5431cdd2bfa4b3dacab1b1173 Mon Sep 17 00:00:00 2001 From: Rohit Paul <113459757+RohitPaul0007@users.noreply.github.com> Date: Sun, 27 Aug 2023 14:16:02 +0530 Subject: [PATCH] Update test_jquery.js --- test/test_jquery.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/test_jquery.js b/test/test_jquery.js index b6ab8c1b..cf067d4e 100644 --- a/test/test_jquery.js +++ b/test/test_jquery.js @@ -4,7 +4,7 @@ module('jQuery.URI', { setup: function() { - var links = [ + let links = [ 'an HTTP link', 'an HTTPS link', 'some pdf', @@ -24,32 +24,32 @@ $('
foo
') .appendTo(document.body); - var script = document.createElement('script'); + let script = document.createElement('script'); script.type = 'text/javascript'; script.src = '/nonexistant.js'; document.getElementById('testestest').appendChild(script); }, teardown: function() { - var t = $('#testestest'); + let t = $('#testestest'); t.next().remove(); t.remove(); } }); test('.uri()', function() { - var $links = $('#testestest'), + let $links = $('#testestest'), $first = $links.children().first(), uri = $first.uri(), _uri = URI('/hello.world'); ok(uri !== _uri, 'different URI instances'); - var __uri = $first.uri(_uri); + let __uri = $first.uri(_uri); ok(uri !== _uri, 'different URI instances'); ok(uri === __uri, 'same URI instances'); equal($first.attr('href'), _uri.toString(), 'equal URI'); }); test('filtering with :uri()', function() { - var $links = $('#testestest'); + let $links = $('#testestest'); // find using accessor and "begins with" comparison equal($('a:uri(href^=#anc)').length, 1, '$(selector) Anchor Link'); @@ -90,7 +90,7 @@ equal($('div').has(':uri(suffix=js)').length, 1, '.has(\':uri(suffix=js)\')'); }); test('.attr("href")', function() { - var $links = $('#testestest'), + let $links = $('#testestest'), $first = $links.children().first(), first = $first.get(0), uri = $first.uri(), @@ -118,7 +118,7 @@ equal(href(first), uri.toString(), 'transparent href update'); }); test('.attr("uri:accessor")', function() { - var $links = $('#testestest'), + let $links = $('#testestest'), $first = $links.children().first(), uri = $first.uri(), href = function(elem) { @@ -138,4 +138,4 @@ ok($first.uri() === uri, 'URI persisted'); }); -})(); \ No newline at end of file +})();