diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-03-04 18:30:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-04 18:30:51 +0100 |
commit | 9cb124ed00aad8ac47690e31ad0bb8c3c365663d (patch) | |
tree | 4cfbdd63f3dbe87398b8bde41de1f2e65ed3c4f2 /test/data | |
parent | c10945d0e15c5048ae8b5b7e3f8241ad27671a7c (diff) | |
download | jquery-9cb124ed00aad8ac47690e31ad0bb8c3c365663d.tar.gz jquery-9cb124ed00aad8ac47690e31ad0bb8c3c365663d.zip |
Build: Update jsdom; migrate a test with Symbol polyfill to an iframe test
So far, we've been testing that jQuery element iteration works with polyfilled
Symbol & transpiled for-of via a Node test with jsdom with the Symbol global
removed. Unfortunately, jsdom now requires Symbol to be present for its internal
functionality so such a test is no longer possible. Instead, it's been migrated
to an iframe test with transpiled JavaScript.
This PR also enables us to use ECMAScript 2017 or newer in Node.js code.
Closes gh-4305
Diffstat (limited to 'test/data')
-rw-r--r-- | test/data/core/jquery-iterability-transpiled-es6.js | 14 | ||||
-rw-r--r-- | test/data/core/jquery-iterability-transpiled.html | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/data/core/jquery-iterability-transpiled-es6.js b/test/data/core/jquery-iterability-transpiled-es6.js new file mode 100644 index 000000000..0c3bda624 --- /dev/null +++ b/test/data/core/jquery-iterability-transpiled-es6.js @@ -0,0 +1,14 @@ +/* global startIframeTest */ + +jQuery( function() { + "use strict"; + + var elem = jQuery( "<div></div><span></span><a></a>" ); + var result = ""; + var i; + for ( i of elem ) { + result += i.nodeName; + } + + startIframeTest( result ); +} ); diff --git a/test/data/core/jquery-iterability-transpiled.html b/test/data/core/jquery-iterability-transpiled.html new file mode 100644 index 000000000..69ac18252 --- /dev/null +++ b/test/data/core/jquery-iterability-transpiled.html @@ -0,0 +1,14 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>jQuery objects transpiled iterability test page</title> + <script src="../../../node_modules/core-js/client/core.min.js"></script> + <script src="../../jquery.js"></script> + <script src="../iframeTest.js"></script> + <script src="jquery-iterability-transpiled.js"></script> +</head> +<body> + <p>jQuery objects transpiled iterability test page</p> +</body> +</html> |