Skip to content

Commit

Permalink
Merge pull request #12728 from Snuffleupagus/gulpfile-move-timezone
Browse files Browse the repository at this point in the history
[gulpfile.js] Move the time-zone hack to the `testing-pre` task, such that *all* tests work regardless of the current time-zone
  • Loading branch information
timvandermeij authored Dec 11, 2020
2 parents 00b4f86 + 20557d8 commit 8beb62e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,10 @@ gulp.task(

gulp.task("testing-pre", function (done) {
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();
});

Expand Down Expand Up @@ -1576,7 +1580,6 @@ gulp.task(
gulp.task(
"unittest",
gulp.series("testing-pre", "generic", "components", function () {
process.env.TZ = "UTC";
return createTestSource("unit");
})
);
Expand Down

0 comments on commit 8beb62e

Please sign in to comment.