Skip to content

Commit

Permalink
test(Date & Time Node): Skip the test when local timezone is not in U…
Browse files Browse the repository at this point in the history
…TC (no-changelog) (n8n-io#5735)

Check for moment default timezone in dateTime tests
  • Loading branch information
agobrech authored Mar 20, 2023
1 parent cb2ba97 commit 46d013c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import moment from 'moment';
import { testWorkflows, getWorkflowFilenames } from '../../../../test/nodes/Helpers';

const workflows = getWorkflowFilenames(__dirname);

// ! When making changes to the Workflow test files make sure to export env TZ=UTC as Github Actions runs in UTC timezone
if (new Date().getTimezoneOffset() === 0) {
if (new Date().getTimezoneOffset() === 0 || moment().utcOffset() === 0) {
describe('Test DateTime Node', () => testWorkflows(workflows));
} else {
describe('Test DateTime Node', () => {
Expand Down

0 comments on commit 46d013c

Please sign in to comment.