From f74a364b1aac2c96cedd0a8cf5c7188268b9bcde Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Thu, 25 Aug 2022 14:27:44 +0300 Subject: [PATCH] bugfix: Wipe tests/zones before generation It is possible for timezones to disappear (well, unlikely but still), and in that case there will be leftover tests for gone zones under tests/zones. So wipe tests/zones clean when generating (latest) tests. For versioned tests, the tests go under temp, which is wiped by default already. --- Gruntfile.js | 3 ++- tasks/data.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 02bba034..2b1b1c92 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -43,7 +43,8 @@ module.exports = function(grunt) { }, clean: { - data: ['temp'] + data: ['temp'], + tests: ['tests/zones'], }, exec: { diff --git a/tasks/data.js b/tasks/data.js index 37be2001..1b5166c3 100644 --- a/tasks/data.js +++ b/tasks/data.js @@ -6,6 +6,9 @@ module.exports = function (grunt) { if (!grunt.option('dirty-run')) { grunt.task.run('clean:data'); + if (version === 'latest') { + grunt.task.run('clean:tests'); + } } grunt.task.run([