From ee1edffb99f760e51183383ea81c7d0fcdfd0603 Mon Sep 17 00:00:00 2001 From: Yongjie Zhao Date: Sat, 26 Sep 2020 17:58:53 +0800 Subject: [PATCH] fix(jest): using UTC mock date --- .../javascripts/explore/components/DateFilterControl_spec.jsx | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/superset-frontend/spec/javascripts/explore/components/DateFilterControl_spec.jsx b/superset-frontend/spec/javascripts/explore/components/DateFilterControl_spec.jsx index 065f979539072..e955722c0fdb3 100644 --- a/superset-frontend/spec/javascripts/explore/components/DateFilterControl_spec.jsx +++ b/superset-frontend/spec/javascripts/explore/components/DateFilterControl_spec.jsx @@ -28,7 +28,7 @@ import ControlHeader from 'src/explore/components/ControlHeader'; // Mock moment.js to use a specific date jest.mock('moment', () => { - const testDate = new Date('09/07/2020'); + const testDate = new Date('2020-09-07'); return () => jest.requireActual('moment')(testDate); }); diff --git a/tox.ini b/tox.ini index fa32c41af049b..cbbdb5a718376 100644 --- a/tox.ini +++ b/tox.ini @@ -37,7 +37,7 @@ setenv = # docker run -p 8080:8080 --name presto prestosql/presto mysql-presto: SUPERSET__SQLALCHEMY_EXAMPLES_URI = presto://localhost:8080/memory/default # based on https://github.com/big-data-europe/docker-hadoop - # close the repo & run docker-compose up -d to test locally + # clone the repo & run docker-compose up -d to test locally mysql-hive: SUPERSET__SQLALCHEMY_DATABASE_URI = mysql://mysqluser:mysqluserpassword@localhost/superset?charset=utf8 mysql-hive: SUPERSET__SQLALCHEMY_EXAMPLES_URI = hive://localhost:10000/default # make sure that directory is accessible by docker