mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core)!: Make date extensions outputs match inputs (#6435)
This commit is contained in:
committed by
कारतोफ्फेलस्क्रिप्ट™
parent
632ea275b7
commit
85372aabdf
@@ -16,6 +16,10 @@ describe('Data Transformation Functions', () => {
|
||||
|
||||
test('.beginningOf("week") should work correctly on a date', () => {
|
||||
expect(evaluate('={{ DateTime.local(2023, 1, 20).beginningOf("week") }}')).toEqual(
|
||||
DateTime.local(2023, 1, 16, { zone: TEST_TIMEZONE }),
|
||||
);
|
||||
|
||||
expect(evaluate('={{ new Date(2023, 0, 20).beginningOf("week") }}')).toEqual(
|
||||
DateTime.local(2023, 1, 16, { zone: TEST_TIMEZONE }).toJSDate(),
|
||||
);
|
||||
});
|
||||
@@ -49,6 +53,9 @@ describe('Data Transformation Functions', () => {
|
||||
|
||||
test('.endOfMonth() should work correctly on a date', () => {
|
||||
expect(evaluate('={{ DateTime.local(2023, 1, 16).endOfMonth() }}')).toEqual(
|
||||
DateTime.local(2023, 1, 31, 23, 59, 59, 999, { zone: TEST_TIMEZONE }),
|
||||
);
|
||||
expect(evaluate('={{ new Date(2023, 0, 16).endOfMonth() }}')).toEqual(
|
||||
DateTime.local(2023, 1, 31, 23, 59, 59, 999, { zone: TEST_TIMEZONE }).toJSDate(),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user