Practical Data / tests

Recorded answers from jev-latest

Unit tests and parsing

Code makes many decisions before and after the model. These tests check that code. The results are from the build of this site.

168 of 168 unit tests pass.

Tables the extension skips

Before any question goes to the model, code drops tables that are not data. The model never sees these tables, thus no check above covers them. The browser tests check each rule on a synthetic page.

  • Tables marked role="presentation", and tables that contain other tables: page layout.
  • Tables in an editable region, because an editor would save the shading with the document.
  • App lists, such as a mail inbox. Such a table is marked role="grid", has a checkbox or button in every row, and has no header row. All three must be true. A data grid with a header row is still shaded, even with a checkbox in every row.
  • Tables with fewer than two rows or two columns.

Parsing

The parser changes cell text into numbers and dates. Each row below is the output of parseNumber and parseDate during the build. Text that is not clear becomes no value, thus it cannot change a scale.

Cell textValueUnitResult
$0.0250.025$Amount
€1,200.501200.5€Amount
($3.00)-3$Amount
-$3-3$Amount
45%45%Amount
.3120.312Amount
1.5B1500000000Amount
272K272000Amount
6' 6"78inAmount
2:59179m:ssA clock value. The model decides if it is a duration or a time of day
1544:1092650m:ssA clock value. The model decides if it is a duration or a time of day
20–2522.5Range from 20 to 25; the value is the midpoint
65+65A limit, not an exact amount
≤ 272K272000A limit, not an exact amount
> 200K200000A limit, not an exact amount
$0.20 / GB for requests up to 100,000 units0.2$Amount
3 for 45Not a number
12-4Not a number
35-10Not a number
1,0661066Amount
3.2 GB3.2GBAmount
829.8 m829.8mAmount
2,722 ft2722ftAmount
N/ANo value
—No value
2023-01-01A date: Jan 1, 2023. Code shades dates from earliest to latest
July 17, 2009A date: Jul 17, 2009. Code shades dates from earliest to latest
December 1993A date: Dec 1993. Code shades dates from earliest to latest
3 days agoA date: 3 days ago. Code shades dates from earliest to latest
February 6A date: Feb 6. Code shades dates from earliest to latest
July 16–22, 2021A date: Jul 19, 2021. Code shades dates from earliest to latest
Jan 15, 1967 (1966)A date: Jan 15, 1967. Code shades dates from earliest to latest
7:05 PMA time of day. Not shaded
Sun 8:20 PMA date: Sun 8:20 PM. Code shades dates from earliest to latest

Test files

admit.test.ts 3 of 3

Passrate-limits an IPv6 address by its /64 prefix1 ms
Passrate-limits an IPv4 address by the whole address<1 ms
Passcompares a bearer token with the secret13 ms

allow.test.ts 8 of 8

The free endpoint accepts each request that the extension sends on the test pages. It refuses all other requests.

Passaccepts every request the extension sends for the fixture pages388 ms
Passaccepts the extension's wording with any header<1 ms
Passrefuses questions the extension doesn't ask<1 ms
Passclips long table data instead of refusing it<1 ms
Passrefuses table data with a shape that the extension's builders don't produce<1 ms
Passrefuses a state with a shape that the extension's builders don't produce<1 ms
Passclips harder when the table data is too large in total15 ms
Passreads a JSON body up to the byte limit3 ms

allowance.test.ts 4 of 4

The free daily allowance as the reader sees it: the requests that remain, the reset time, and the text.

Passthe reset is the next UTC midnight, shown in local time14 ms
Passthe lowest count reported today wins; a new day starts over<1 ms
Passa note appears only when under a fifth of today's allowance is left<1 ms
Passused-up messages say whose allowance it was and when it resets<1 ms

cache.test.ts 2 of 2

Passa stored answer reads back7 ms
Passconcurrent writes stay within the cap4022 ms

concurrency.test.ts 5 of 5

Passresults come back in item order, with at most `limit` calls running37 ms
Passan empty list resolves at once1 ms
Passthe first failure rejects, aborts the running calls, and starts no more7 ms
Passan abort of the outer signal reaches the calls<1 ms
Passsleep rejects with the signal's reason when it aborts<1 ms

dates.test.ts 16 of 16

Cell text to dates: calendar dates, months, times with offsets, and relative times such as 3 days ago. Day and month order for numeric dates. The text that must not become a date.

Passparses calendar dates in common formats4 ms
Passparses months without a day<1 ms
Passparses times of day, offsets, and two-digit years<1 ms
Passrelative times count back from now<1 ms
Passrejects strings that are not dates<1 ms
Passnumeric dates need a column to tell day from month<1 ms
Passa column of dates: missing cells, units, and the share needed<1 ms
Passformats legend text at the column's precision14 ms
Passdates without a year take one from their column<1 ms
Passa sorted column of dates without years crosses New Year once<1 ms
Passignores notes in parentheses and reads ranges of days as their midpoint3 ms
Passwords that name Object.prototype members are not dates<1 ms
Passcells far longer than any date return null1 ms
Passa date with a long trailing note still parses<1 ms
Passa weekday and a clock time without a date is a time in a week<1 ms
Passa column of weekday times starts its week after its longest gap<1 ms

flags.test.ts 5 of 5

Flags from the dev build: the issue that a flag files, and the order of the calls to GitHub. The store build has no flags.

Passa flag's issue names the host and lists the judged columns1 ms
Passa skipped table without a screenshot says so and has no image<1 ms
Passflag ids sort by time<1 ms
Passfiling writes the context and screenshot, then opens the issue30 ms
Passa GitHub error stops the flag1 ms

judge.test.ts 16 of 16

The judge, with answers supplied by code. Code ignores identifiers and two-level labels. Shared scales. Rows that sum the other rows are totals. One failed table does not stop the other tables.

Passjudges price and category columns, sharing scales across tables35 ms
Passdeclines numeric columns the model calls identifiers1 ms
Passdrops two-level ordinals unless a shared scale widens them4 ms
Passa failed share request keeps per-table scales instead of failing the page2 ms
Passone table's failure leaves the other tables judged2 ms
Passunordered label columns never send pairwise order questions1 ms
Passnever offers a share for same-named columns of different magnitude2 ms
Passcolumns on one shared scale share one direction<1 ms
Passbrackets that name the rows are ignored; brackets that are values are shaded6 ms
Passranks that count the rows, and ranks that don't<1 ms
Passranks in row order are ignored; ranks out of row order are shaded, on a linear scale2 ms
Passdate columns are shaded by code, never asked about, and never shared1 ms
Passa shared ordinal scale too wide to reorder leaves each table its own order2 ms
Passa row whose numbers add up to the other rows is a total<1 ms
Passa row labeled Total needs only one column to add up<1 ms
Passa total found by code is left out of the domain even when the model calls it an entry<1 ms

legend.test.ts 6 of 6

The card that shows when you put the pointer on a header: ranges and units for shared, log, ranked, and duration columns, and the totals that are not on the scale.

Passa shared, log-scaled price column15 ms
Passa linear column that excludes a totals row<1 ms
Passranked categories show their first and last level as extents<1 ms
Passduration extents read back as clock values<1 ms
Passa date column reads as dates, earliest to latest5 ms
Passa column of times without dates reads as times<1 ms

model.test.ts 7 of 7

Validation of answers, and the quota and allowance values from the free endpoint.

Passaccepts answers that match the questions asked1 ms
Passrejects missing answers, wrong types, unknown options and out-of-range probabilities<1 ms
Passa spent hosted allowance fails at once as quota, without waiting or retrying40 ms
Passa spent allowance for everyone is told apart from this install's own2 ms
Passhosted responses report what's left of the allowance; cache hits report nothing4 ms
Passthe hosted endpoint retries a 503 only once, because each attempt spends from the allowance279 ms
PassJev retries a 503 four times3770 ms

order.test.ts 4 of 4

The label order from pair answers, also when some answers disagree.

Passrecovers the true order from consistent pairs1 ms
Passa contradictory non-adjacent comparison does not flip the order<1 ms
Passplaces are ordered by their numbers, worst first<1 ms
Passlabels that are not all places get no code order<1 ms

orient.test.ts 1 of 1

Row-based tables, read one row at a time.

Passtransposes a benchmark table so each benchmark becomes a column1 ms

pace.test.ts 3 of 3

Passone change sends one request after the first wait2 ms
Passa cell that changes every second for an hour sends at most 25 requests3 ms
Passafter a quiet period, a change waits only the first delay again<1 ms

parse.test.ts 59 of 59

Cell text to numbers: currencies, percentages, suffixes, durations, ranges, and bounds. Also the text that must not become a number.

PassparseNumber("$0.25")3 ms
PassparseNumber("6½")<1 ms
PassparseNumber("½")<1 ms
PassparseNumber("51½")<1 ms
PassparseNumber("8 1⁄2")1 ms
PassparseNumber("1⁄2")<1 ms
PassparseNumber("22 3⁄4")<1 ms
PassparseNumber("81⁄2")<1 ms
PassparseNumber("$14.00")<1 ms
PassparseNumber("€1,200.50")<1 ms
PassparseNumber("-$3")<1 ms
PassparseNumber("($3.00)")<1 ms
PassparseNumber("45%")<1 ms
PassparseNumber("45.2 %")<1 ms
PassparseNumber("0.33x")<1 ms
PassparseNumber(".312")<1 ms
PassparseNumber("−0.5")<1 ms
PassparseNumber("1,425,671,352")<1 ms
PassparseNumber("1,234[12]")<1 ms
PassparseNumber("≤ 272K")<1 ms
PassparseNumber("$1.5B")<1 ms
PassparseNumber("12 GB")<1 ms
PassparseNumber("3.2 GHz")<1 ms
PassparseNumber("2024")<1 ms
PassparseNumber("42*")<1 ms
PassparseNumber("6' 6\\"")<1 ms
PassparseNumber("6'0\\"")<1 ms
PassparseNumber("5′ 11″")<1 ms
PassparseNumber("6 ft 2 in")<1 ms
PassparseNumber("20-25")<1 ms
PassparseNumber("26–30")<1 ms
PassparseNumber("$10 to $20")<1 ms
PassparseNumber("1.5-2.5 GB")<1 ms
PassparseNumber("65+")<1 ms
PassparseNumber("1M+")<1 ms
PassparseNumber("$500K+")<1 ms
PassparseNumber("35-10")<1 ms
PassparseNumber("6-6")<1 ms
PassparseNumber("2024-01")<1 ms
PassparseNumber("2:59")<1 ms
PassparseNumber("3:00")<1 ms
PassparseNumber("0:57")<1 ms
PassparseNumber("1:02:03")<1 ms
PassparseNumber("1544:10")<1 ms
PassparseNumber("12345:00")<1 ms
PassparseNumber("1200:1")<1 ms
PassparseNumber("2:61")<1 ms
PassparseNumber("7:05 PM")<1 ms
PassparseNumber("1st")<1 ms
PassparseNumber("3–4")<1 ms
PassparseNumber("2024-01-02")<1 ms
PassparseNumber("1:23.45")<1 ms
PassparseNumber("GPT-5 mini")<1 ms
PassparseNumber("Not applicable")<1 ms
Passa value followed by the condition it holds under parses to the value<1 ms
PassisMissing recognizes placeholders<1 ms
Passclock-like durations are numbers; times of day stay dates<1 ms
Passa unit that names an Object.prototype member is a unit, not a magnitude<1 ms
Passa value followed by a signed change parses as the value<1 ms

profile.test.ts 7 of 7

Column profiles: kind, spread, unit, ranks, years, and label order. Dates do not go to the model.

Passprofiles each column by kind8 ms
Passnumeric profile reports spread, unit, rank and year hints19 ms
Passcategorical profile keeps first-seen level order and display text1 ms
Passtimestamps and dates are not offered as categories or numbers<1 ms
Passlabels that name Object.prototype members are levels like any other<1 ms
Passa win/loss streak column reads as wins minus losses<1 ms
Passa value with its rank in parentheses reads as the value when the ranks follow the values<1 ms

quota.test.ts 4 of 4

Passcounts requests per install up to the daily limit2 ms
Passgives back a request that failed upstream, with its estimated tokens<1 ms
Passrefuses every install once the token budget is spent<1 ms
Passcounts estimated tokens for requests in flight against the budget<1 ms

scale.test.ts 7 of 7

Values to positions to colors, for each palette.

Passlower-is-better puts the cheapest row at t=1 (the good end)1 ms
Passlog transform centers the geometric midpoint<1 ms
Passexcluded aggregate rows get no position<1 ms
Passordinal levels spread evenly from 0 to 1<1 ms
Passevery palette has full-strength ends, and fading ramps leave the middle plain1 ms
Passon dark pages, single-hue scales ramp up from the background<1 ms
PassisPaletteId accepts palette names only<1 ms

settings.test.ts 5 of 5

Passlocal and private-network hosts are private1 ms
Passpublic hosts are not private<1 ms
Passin every-site mode, a private host is off until the user turns it on<1 ms
Passturning a public host off and on again in every-site mode<1 ms
Passin chosen-sites mode, private and public hosts are off until the user turns them on<1 ms

tint.test.ts 1 of 1

Colors on the page background. For each palette, step, and page, the text contrast stays at 5:1 or more. If not, the cell is not shaded.

Passtext keeps 5:1 contrast on every palette, step, and page, or the cell is left plain18 ms

usage.test.ts 5 of 5

Passa model answer records its tokens and the install's count today35 ms
Passa cache hit records no tokens and no count<1 ms
Passa refusal records its error code<1 ms
Passan upstream refusal records the provider's status<1 ms
Passother routes and unreadable bodies3 ms