
> persian-kit@1.0.0 test:js
> node --test 'tests/js/*.test.mjs'

✔ the fixture covers 1300 to 1500 AP (0.67475ms)
✔ the fixture is what the date picker calendar computes (1.517542ms)
✔ the block editor's date editor agrees with the date picker (1.078875ms)
✔ the date picker bundle converts dates by the same calendar (3.901667ms)
✔ the bundle rejects dates that do not exist (0.184667ms)
✔ the publish box gets one row: the picker, then WordPress's hour and minute (250.9415ms)
✔ a picked date is written into aa, mm and jj (76.705792ms)
✔ Cancel shows the restored date in the picker (61.849125ms)
✔ the publish text shows the Jalali date whenever post.js rewrites it (36.486792ms)
✔ Persian digits typed into the hour and minute become English (26.043708ms)
✔ each Quick Edit row gets its own picker (56.379542ms)
✔ the input becomes the hidden field that submits the ISO date (182.572083ms)
✔ a picked date is written into the input, with input and change events (64.065209ms)
✔ only marked inputs are upgraded (16.265333ms)
✔ ACF dates are kept as Ymd (18.0845ms)
✔ date and time fields add a time input and keep Y-m-d H:i:s (22.91175ms)
✔ limits come from data attributes or the input itself (20.819667ms)
✔ range pickers submit their own value (20.653917ms)
✔ inputs added later are upgraded, and a cloned row gets its own picker (47.059791ms)
[intl-datepicker] Ignoring value "2026-02-31" for type="date".
✔ a form reset restores the first value in the picker and the input (61.174417ms)
✔ a Jalali value in the field is shown, and kept until a date is picked (28.161416ms)
✔ values in other formats are left in the input (15.899ms)
✔ refresh() reads a value a script wrote, without events (43.777375ms)
✔ picker() returns the field's picker (15.52075ms)
✔ hint="off" marks the picker to hide its typing hint (15.67175ms)
✔ day-month-year formats are written and read in the field's order (34.541ms)
✔ a value in a day-month-year format is shown: a default date, a draft, a prefill (29.070417ms)
✔ all seven Gravity Forms date formats are written and read back (57.029958ms)
✔ formats the field does not know fall back to Y-m-d (11.172708ms)
✔ a form reset restores a day-month-year value (23.951375ms)
✔ a Forminator group row copied as HTML gets its own picker, value and label (20.126542ms)
✔ Pashto and Kurdish pickers get the Persian labels (38.504625ms)
✔ without the browser's Pashto or Kurdish names, the picker shows Dari or Iranian ones (23.211833ms)
✔ only inputs a builder watches get English digits (117.134166ms)
✔ two builders on one page share the listeners (7.207458ms)
✔ loading the script twice keeps one set of listeners (5.208167ms)
✔ phone, number, currency and Iranian fields get English digits as people type (108.522583ms)
✔ other text and inputs outside Forminator forms keep their digits (9.578833ms)
✔ the digits are fixed before Forminator's own listeners run, and the caret stays (6.2155ms)
✔ a changed or pasted value is fixed too (6.291833ms)
✔ a typed Persian digit is swapped before a mask sees it, at the caret (7.487375ms)
✔ a key press with a Persian digit inserts the English one (25.567083ms)
✔ a pasted value with Persian digits is pasted with English ones (13.145958ms)
✔ Review ticks the default rows and the tasks that can run (16.525208ms)
✔ Continuing while the source is active saves the choices and opens Deactivate (0.476958ms)
✔ Deactivate opens only with the backup ticked and every item handled (0.203583ms)
✔ An inactive source skips Deactivate and imports to the report (5.986958ms)
✔ A switch in progress opens where it was left after a reload (2.27975ms)
✔ Another tab working on the switch is a plain error, without the WP-CLI hint (0.394792ms)
✔ A blocked REST API shows the WP-CLI command (0.274625ms)
✔ Undo runs until done and adds up the counts (0.432084ms)
✔ The report pages through one outcome at a time (0.369083ms)
✔ The letter fix still reads its status through the shared REST client (0.294917ms)
✔ leap years from 1399 to 1410 (2.17475ms)
✔ Esfand has 30 days only in leap years (0.157459ms)
✔ 30 Esfand round-trips only in leap years (0.128625ms)
✔ 30 Esfand 1404 does not exist and 1 Farvardin 1405 is 2026-03-21 (0.38625ms)
✔ other month lengths (0.059792ms)
✔ parseEditorDate reads the site-local editor string and ignores any offset (0.199625ms)
✔ parseEditorDate rejects malformed and impossible dates (0.077959ms)
✔ 15 Dey 1405 10:30 round-trips with 2027-01-05T10:30:00 (0.138666ms)
✔ clampJalaliParts keeps the day inside the month (0.100291ms)
✔ clampJalaliParts limits every part and rejects non-numbers (0.122667ms)
✔ formatJalaliLabel (0.063666ms)
✔ month names come from the page (JalaliScript.php) (0.398042ms)
✔ without names, or with a list cut short, the Iranian names (0.309333ms)
✔ only the active tab can be reached with Tab (169.14875ms)
✔ clicking a tab shows its panel without leaving the page (46.8785ms)
✔ switching tabs updates the address and where Save returns to (35.937209ms)
✔ a modified click is left to the browser (38.991041ms)
Not implemented: navigation to another Document
✔ the save bar hides on the Tools tab (36.335167ms)
✔ arrow keys, Home and End move between tabs (41.559125ms)
✔ in right-to-left admin the left arrow moves to the next tab (37.557584ms)
✔ other keys are left alone (35.65175ms)
✔ an edit shows "Unsaved changes" (50.421084ms)
✔ the fix tool sees unsaved changes made on another tab (70.589791ms)
✔ the compatibility cards open when the Plugins screen notice links to them (62.078666ms)
✔ opening the Integrations tab tells the server once that its New cards were seen (35.408625ms)
✔ without unseen integrations nothing is sent (30.331125ms)
✔ a link to the compatibility cards opens them (32.378792ms)
﹣ wc.date has every member the Jalali one reads (0.792458ms) # WooCommerce is not installed next to the plugin.
﹣ WooCommerce's screens read wc.date and wc.csvExport when they load, not before (0.084292ms) # WooCommerce is not installed next to the plugin.
﹣ the CSV builder and the custom range calendar are where the script looks (0.048ms) # WooCommerce is not installed next to the plugin.
✔ wc.date is replaced and the original kept as it was (23.264083ms)
✔ last month is the whole Jalali month before (1) (6.179ms)
✔ this quarter is the Jalali season so far (2) (1.031958ms)
✔ year to date starts on 1 Farvardin (3) (1.167041ms)
✔ last year is the whole Jalali year, with 30 Esfand in a leap year (4) (1.668958ms)
✔ 30 Esfand of a leap year compares with 29 Esfand a year back (5) (1.626708ms)
✔ a custom range compared with the previous period keeps its length, as in WooCommerce (1.963125ms)
✔ the day is the store's, not the browser's (7) (2.821125ms)
✔ weeks start on the site's first day of the week (8) (1.267125ms)
✔ month to date compares with the same days of the month before (9) (0.473625ms)
✔ a bookmarked period follows the day it is opened (10) (0.468459ms)
✔ the default date range applies without period in the URL (1.995083ms)
✔ the last season before Nowruz is the winter, 1 Dey to 30 Esfand (1.795375ms)
✔ the same query gives the same object, so the screens see no change (1.159167ms)
✔ the compared date in the tooltip moves by Jalali months and years (0.736625ms)
✔ the chart formats put the day before the month (0.486792ms)
✔ a wc.date of another shape is left alone, and dates stay Gregorian (13) (0.411625ms)
✔ dates use the names of the page's set (2.17675ms)
✔ dates printed for people are Jalali (B) (2.243167ms)
✔ formats machines read stay Gregorian (11) (0.603292ms)
✔ stats by month, season or year ask the server for Jalali periods (C) (0.533375ms)
✔ the flag is added only once wc.date is Jalali (0.7795ms)
✔ custom ranges are picked on a Jalali calendar, written into WooCommerce's fields (D) (751.936041ms)
✔ a range after the old one writes the end first, so the start is never after it (9.550333ms)
✔ the fields keep the order their placeholder names (16.966ms)
✔ focus lost to a redrawn day stays in the popover; focus that leaves reaches it (26.283333ms)
✔ CSV files from the browser get a Jalali column after each date column (E) (1.071125ms)
✔ only columns of dates count, and empty cells stay empty (1.337542ms)
✔ a date rule in the advanced filters is picked on a Jalali calendar too (17.258541ms)
✔ the year before gets an empty day where only the primary year has 30 Esfand (1.5815ms)
✔ the year before loses 30 Esfand where only it has one (0.844458ms)
✔ days already in line are left as they are (1.471375ms)
✔ only the daily stats of the year before on this screen are lined up (14.033459ms)
✔ digits inside price elements become Persian, other digits stay (100.862708ms)
✔ prices the blocks add later are converted (15.587916ms)
✔ a price whose text React changes is converted again (30.294417ms)
✔ a price React re-renders with new children is converted (15.541083ms)
✔ converting does not set off another round of changes (9.69475ms)
✔ a price already in Persian digits is not written to (9.928167ms)
✔ the city field becomes a combobox for its province's list (132.018041ms)
✔ typing opens the list with the matching cities (105.239167ms)
✔ matching ignores spaces, half-spaces and other spellings (51.29975ms)
✔ the same name comes first, then names that start with it, then names that contain it (42.614541ms)
✔ one letter finds names starting with it, not names containing it (41.548834ms)
✔ at most eight cities are shown (43.08725ms)
✔ nothing matching closes the list and says so (37.2365ms)
✔ arrows move the active option and Enter picks it (40.56525ms)
✔ arrow keys do not reach the form's own handlers (57.856625ms)
✔ Enter with no active option, or with the list closed, is left to the form (43.384084ms)
✔ a click picks an option, keeping the focus in the field (41.83175ms)
✔ Escape, Tab and a click outside close the list (39.108375ms)
✔ Escape with the list closed is left alone (34.154333ms)
✔ autofill and focus do not open the list (35.387042ms)
✔ the options are text, never markup (37.000333ms)
✔ the shared cases find the listed name first (557.404458ms)
✔ a province with no list, or none chosen yet, gives no list (36.752542ms)
✔ the list follows a province changed without an event once the city is focused (42.461125ms)
✔ focusing never clears the city (37.438291ms)
✔ picking another province clears a city of the old one, firing input and change (44.065917ms)
✔ a city of the old province typed another way is cleared too (37.699875ms)
✔ a province change closes an open list (40.821375ms)
✔ a typed name on no list is kept when the province changes (36.561375ms)
✔ a name both provinces have is kept (38.261166ms)
✔ a saved city is not cleared on load, even when it is not the province's (44.734834ms)
✔ another country removes the combobox and Iran brings it back (37.032083ms)
✔ a province change outside Iran never clears the city (33.48625ms)
✔ a form that appears later is picked up (68.941709ms)
✔ a field taken out of the page takes its list with it (66.922166ms)
✔ billing and shipping are separate (40.645875ms)
✔ fields are found by autocomplete token when their ids say nothing (45.757875ms)
✔ the classic cart calculator is found by id and its jQuery-only events are heard (43.423209ms)
✔ the classic form follows WooCommerce's redrawn state field (40.861292ms)
✔ a city that another plugin made a select is left alone (34.5445ms)
✔ without the city data the script does nothing (34.777917ms)
✔ every WooCommerce date field gets a picker, without the YYYY-MM-DD placeholder (317.936833ms)
✔ the sale dates limit each other (81.025291ms)
✔ cancelling a sale schedule clears both pickers (56.237708ms)
✔ variations loaded later get pickers, and a picked date marks the variation changed (61.850042ms)
✔ Jalali values written by date_i18n() are saved as Gregorian (33.44475ms)
✔ Persian digits in the order hour and minute become English (24.601958ms)
✔ numbers, a price and the Iranian fields get English digits as people type (69.905375ms)
✔ other text and inputs outside WPForms forms keep their digits (9.2495ms)
✔ a key press with a Persian digit inserts the English one (7.664167ms)
ℹ tests 166
ℹ suites 0
ℹ pass 163
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 3082.238667
