Package: node-luxon
Version: 3.6.1+~3.6.0-1
Severity: important

There is a weird regression when luxon is compiled against nodejs 24,
these tests fail. (note that it is compiled with icu76 at the moment).

FAIL test/datetime/create.test.js
  ● DateTime.fromObject() w/locale weeks handles fully specified dates

    expect(received).toBe(expected) // Object.is equality

    Expected: 4
    Received: 11

      654 |   expect(dt.year).toBe(2022);
      655 |   expect(dt.month).toBe(1);
    > 656 |   expect(dt.day).toBe(4);
          |                  ^
      657 | });
      658 |
      659 | test("DateTime.fromObject() w/localWeekYears handles skew with 
Gregorian years", () => {

      at Object.<anonymous> (test/datetime/create.test.js:656:18)

  ● DateTime.fromObject() w/localWeekYears handles skew with Gregorian years

    expect(received).toBe(expected) // Object.is equality

    Expected: 2021
    Received: 2022

      665 |   expect(dt.localWeekNumber).toBe(1);
      666 |   expect(dt.localWeekday).toBe(1);
    > 667 |   expect(dt.year).toBe(2021);
          |                   ^
      668 |   expect(dt.month).toBe(12);
      669 |   expect(dt.day).toBe(26);
      670 |

      at Object.<anonymous> (test/datetime/create.test.js:667:19)

FAIL test/datetime/localeWeek.test.js
  ● weeksInLocalWeekYear › 2022 should have 53 weeks in en-US

    expect(received).toBe(expected) // Object.is equality

    Expected: 53
    Received: 52

      220 |   });
      221 |   test("2022 should have 53 weeks in en-US", () => {
    > 222 |     expect(DateTime.local(2022, 6, 1, { locale: "en-US" 
}).weeksInLocalWeekYear).toBe(53);
          |                                                                     
             ^
      223 |   });
      224 |   test("2022 should have 52 weeks in de-DE", () => {
      225 |     expect(DateTime.local(2022, 6, 1, { locale: "de-DE" 
}).weeksInLocalWeekYear).toBe(52);

      at Object.<anonymous> (test/datetime/localeWeek.test.js:222:82)

FAIL test/datetime/set.test.js
  ● DateTime#set({ localWeekNumber }) sets the date to the same weekday of the 
target weekNumber (en-US)

    expect(received).toBe(expected) // Object.is equality

    Expected: 5
    Received: 12

      153 |   expect(modified.year).toBe(1982);
      154 |   expect(modified.month).toBe(1);
    > 155 |   expect(modified.day).toBe(5);
          |                        ^
      156 |   expect(modified.hour).toBe(9);
      157 |   expect(modified.minute).toBe(23);
      158 |   expect(modified.second).toBe(54);

      at Object.<anonymous> (test/datetime/set.test.js:155:24)

  ● DateTime#set({ localWeekYear }) sets the date to the same 
weekNumber/weekday of the target weekYear (en-US)

    expect(received).toBe(expected) // Object.is equality

    Expected: 22
    Received: 21

      176 |   const modified = dt.reconfigure({ locale: "en-US" }).set({ 
localWeekYear: 2017 });
      177 |   expect(modified.localWeekday).toBe(3); // still tuesday
    > 178 |   expect(modified.localWeekNumber).toBe(22); // still week 22
          |                                    ^
      179 |   expect(modified.localWeekYear).toBe(2017);
      180 |   expect(modified.year).toBe(2017);
      181 |   expect(modified.month).toBe(5);

      at Object.<anonymous> (test/datetime/set.test.js:178:36)

FAIL test/info/localeWeek.test.js
  ● Info.getMinimumDaysInFirstWeek reports the correct value

    expect(received).toBe(expected) // Object.is equality

    Expected: 1
    Received: 4

      15 |
      16 | test("Info.getMinimumDaysInFirstWeek reports the correct value", () 
=> {
    > 17 |   expect(Info.getMinimumDaysInFirstWeek({ locale: "en-US" 
})).toBe(1);
         |                                                               ^
      18 |   expect(Info.getMinimumDaysInFirstWeek({ locale: "de-DE" 
})).toBe(4);
      19 | });
      20 |

      at Object.<anonymous> (test/info/localeWeek.test.js:17:63)

  ● Info.getStartOfWeek honors the default locale

    expect(received).toBe(expected) // Object.is equality

    Expected: 1
    Received: 4

      37 |   Helpers.withDefaultLocale("en-US", () => {
      38 |     expect(Info.getStartOfWeek()).toBe(7);
    > 39 |     expect(Info.getMinimumDaysInFirstWeek()).toBe(1);
         |                                              ^
      40 |     expect(Info.getWeekendWeekdays()).toStrictEqual([6, 7]);
      41 |   });
      42 |

      at f (test/info/localeWeek.test.js:39:46)
      at Object.withDefaultLocale (test/helpers.js:58:5)
      at Object.<anonymous> (test/info/localeWeek.test.js:37:11)




-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.17.11+deb14-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages node-luxon depends on:
ii  nodejs  24.11.1+dfsg+~cs24.10.1-1+b1

node-luxon recommends no packages.

node-luxon suggests no packages.

-- no debconf information
-- 
Pkg-javascript-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-javascript-devel

Reply via email to