tests: Add test case to assert ES6 is valid by default

Bug: T75714
Depends-On: Ie309e761f8b20640f7c0e85def0a3d1ccc8a658e
Change-Id: I1b3518ae4599bae93e36aa2bd1c216fc7cde1d90
This commit is contained in:
Timo Tijhof 2024-01-05 21:51:33 +00:00
parent 3e871f2015
commit a516fa48c3

View file

@ -50,8 +50,7 @@ class GadgetResourceLoaderModuleTest extends MediaWikiIntegrationTestCase {
public static function provideValidateScript() {
yield 'valid ES5' => [ true, '[ResourceLoader]', 'var quux = function() {};' ];
// TODO: T75714
// yield 'valid ES6' => [ true, '[ResourceLoader]', 'let quux = (() => {})();' ];
yield 'valid ES6' => [ true, '[ResourceLoader]', 'let quux = (() => {})();' ];
yield 'invalid' => [ false, '[ResourceLoader]', 'boom quux = <3;' ];
yield 'requiresES6 allows ES5' => [ true, '[ResourceLoader|requiresES6]', 'var quux = function() {};' ];