]> source.dussan.org Git - jquery.git/commitdiff
Tests: Update path calculation
authorJordan Beland <jordan.beland@gmail.com>
Wed, 16 Aug 2017 05:07:49 +0000 (22:07 -0700)
committerRichard Gibson <richard.gibson@gmail.com>
Wed, 16 Aug 2017 05:07:49 +0000 (01:07 -0400)
Fixes gh-3756
Closes gh-3757

test/jquery.js

index e337a7940ff2c7c65fe8694fa75c21d76b5d4329..d8eaf86293e5af362f9865d01b6f3a77609aeac9 100644 (file)
@@ -2,7 +2,8 @@
 ( function() {
        /* global loadTests: false */
 
-       var path = window.location.pathname.split( "test" )[ 0 ],
+       var pathname = window.location.pathname,
+               path = pathname.slice( 0, pathname.lastIndexOf( "test" ) ),
                QUnit = window.QUnit || parent.QUnit,
                require = window.require || parent.require,