Merge pull request #12728 from Snuffleupagus/gulpfile-move-timezone

[gulpfile.js] Move the time-zone hack to the `testing-pre` task, such that *all* tests work regardless of the current time-zone
This commit is contained in:
Tim van der Meij 2020-12-11 20:08:52 +01:00 committed by GitHub
commit 8beb62e397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1521,6 +1521,10 @@ gulp.task(
gulp.task("testing-pre", function (done) { gulp.task("testing-pre", function (done) {
process.env.TESTING = "true"; process.env.TESTING = "true";
// TODO: Re-write the relevant unit-tests, which are using `new Date(...)`,
// to not required the following time-zone hack since it doesn't work
// when the unit-tests are run directly in the browser.
process.env.TZ = "UTC";
done(); done();
}); });
@ -1576,7 +1580,6 @@ gulp.task(
gulp.task( gulp.task(
"unittest", "unittest",
gulp.series("testing-pre", "generic", "components", function () { gulp.series("testing-pre", "generic", "components", function () {
process.env.TZ = "UTC";
return createTestSource("unit"); return createTestSource("unit");
}) })
); );