Tests / @ogygia/image
@ogygia/image
423 test runs (423 tests, each run in Node, the browsers or both)
1.08× lines of test for each line of source (10,170 to 9,440) Only real test code counts: test files and their helpers, not fixtures, sample apps or benches.
Blank lines are left out on both sides.
Exactly what is counted
non-blank lines of test code across the repo (*.test.ts, *.test-d.ts, *.spec.ts, and the .ts helpers in test/ and e2e/ folders; no fixtures, fixture apps, stubs or benches), over non-blank lines of packages/*/src (no .d.ts or generated files)89.8% of source lines run by the tests
- 417Unit
- 0Browser
- 6End to end
- 0Type tests
- 0Lint rules
- 0Failing
Coverage
- 89.8%Lines
- 81.9%Branches
- 81.3%Functions
- 87.7%Statements
Every test
423 tests
| Test | Kind | Node | Chromium | Firefox | WebKit |
|---|---|---|---|---|---|
../../../../../__w/ogygia/ogygia/packages/image/e2e/vercel-alone.spec.ts | |||||
| a live card is drawn with no sharp, and one that names an image is refused before any fetch, image_card_source saying to list sharp() | End to end | not run | pass | not run | not run |
| a live page that crops fails its render, image_encoder_cannot naming vercel() and the crop | End to end | not run | pass | not run | not run |
| a live page's resize is named by Vercel's link, nothing signed | End to end | not run | pass | not run | not run |
| prerendered pages name the files the build made, served from the output | End to end | not run | pass | not run | not run |
| the function holds no sharp: vercel() alone has no endpoint maker | End to end | not run | pass | not run | not run |
| vercel() alone cannot make a still, so no page offers one, and a live moving image fails its render | End to end | not run | pass | not run | not run |
packages/image/test/binding-maker.test.ts | |||||
| a file is made by the binding in steps, kept in the Worker cache, and read from it the next time | Unit | pass | not run | not run | not run |
| a file the binding cannot decode (an Images error about the input) is a broken source; any other binding failure is that one file’s | Unit | pass | not run | not run | not run |
| a Worker with no such binding answers 500 kept nowhere, says image_binding_missing once, and keeps nothing | Unit | pass | not run | not run | not run |
packages/image/test/build-counts.test.ts | |||||
| a cold static build encodes each image file it writes once, into the build cache, beside the remote URLs each card that shows one read | Unit | pass | not run | not run | not run |
| a warm static build encodes nothing and writes the same image files, byte for byte | Unit | pass | not run | not run | not run |
packages/image/test/build-end.test.ts | |||||
| a build that failed after its server leg was written leaves the next build on the same plugin to start fresh | Unit | pass | not run | not run | not run |
| a build that failed before its server leg was written leaves the next build on the same plugin to start fresh | Unit | pass | not run | not run | not run |
| a failing end fails this plugin's last buildApp, so the build stops before the adapter | Unit | pass | not run | not run | not run |
| a new app build after a watched one (Kit 3) starts fresh, not late | Unit | pass | not run | not run | not run |
| a watch rebuild (Kit 3) gets what the last end named its files by, so its pages find the last build files | Unit | pass | not run | not run | not run |
| a watch rebuild whose end failed (Kit 3) leaves the next rebuild to end, late | Unit | pass | not run | not run | not run |
| a watch rebuild whose server leg is written before this plugin's last buildApp (Kit 3) ends after the first build's end, late | Unit | pass | not run | not run | not run |
| a watch rebuild whose server leg is written while the first build's end runs (Kit 3) ends after it, late, never beside it | Unit | pass | not run | not run | not run |
| a watch rebuild whose server leg is written while the last rebuild ends (Kit 3) ends after it, never beside it | Unit | pass | not run | not run | not run |
| when an app build hook builds and watches the legs (Kit 3), a rebuild's end runs late, as its server leg is written | Unit | pass | not run | not run | not run |
| when an app build hook builds the legs (Kit 3), the end waits for this plugin's last buildApp | Unit | pass | not run | not run | not run |
| when Vite builds and watches the legs (Kit 2), every rebuild ends as its server leg is written, not late | Unit | pass | not run | not run | not run |
| when Vite builds the legs after the app build hooks (Kit 2), the end runs as the server leg is written | Unit | pass | not run | not run | not run |
| with no app build hook running (a single vite.build()), the server leg written is the end | Unit | pass | not run | not run | not run |
packages/image/test/build-files.test.ts | |||||
| a run a failed build left behind is removed by a later build, once a day old | Unit | pass | not run | not run | not run |
| a watch rebuild after the build ended notes its prerender again | Unit | pass | not run | not run | not run |
packages/image/test/build-head-start.test.ts | |||||
| the build's end waits for a file the prerender's head start is still making, and makes it once | Unit | pass | not run | not run | not run |
packages/image/test/build-write.test.ts | |||||
| a build with many files it cannot make names every one, not only the first | Unit | pass | not run | not run | not run |
| a file the build cannot make fails it with a code that names the source file, not only the made name | Unit | pass | not run | not run | not run |
| a late end (a Kit 3 watch rebuild) hands its prerender the last build's renamed sources, so a page finds the files the last build named by bytes | Unit | pass | not run | not run | not run |
| a marked URL after a colon that starts no URL (a CSS custom property) is only unmarked | Unit | pass | not run | not run | not run |
| a marked URL made absolute against the page's URL (an og:image, a feed's enclosure) names the file at Kit's prerender origin | Unit | pass | not run | not run | not run |
| a marked URL made absolute while Kit's prerender origin is its default fails the build with a code that says to set it | Unit | pass | not run | not run | not run |
| a page that changed a marked URL before writing it (escaped it) fails the build with a code | Unit | pass | not run | not run | not run |
| a prerendered card that shows a remote image > a record of the URLs it showed that is torn, or not a list of http(s) URLs, is a miss: the card is drawn again, never a failed build | Unit | pass | not run | not run | not run |
| a prerendered card that shows a remote image > fetches its remote image as a share card, so the build's remote messages name a card as the asker | Unit | pass | not run | not run | not run |
| a prerendered card that shows a remote image > is named by the bytes it drew: when the host's image changes, the next (warm) build writes a new file, never the old picture under the old name | Unit | pass | not run | not run | not run |
| a prerendered page's files are written under the app folder, and its marked URLs name them | Unit | pass | not run | not run | not run |
| a prerendered page's remoteImage() in a build with no image({ remote }) fails it, naming the host to list | Unit | pass | not run | not run | not run |
| a prerendered page's remoteImage() is fetched by the build, its files named by the bytes it got, and every name of them in the pages rewritten to that | Unit | pass | not run | not run | not run |
| a warmed preset's files are written under the app folder by their recipe | Unit | pass | not run | not run | not run |
| an end handed a handoff whose files are already written (no notes file) writes nothing and deletes no folder, not even the working one | Unit | pass | not run | not run | not run |
| the build hands what it renders after its end (an SPA fallback) the files it wrote, with no notes and no mark; the next build starts a new run | Unit | pass | not run | not run | not run |
| warming a preset warms its twins: a dark file's files are made from that file, and an art crop's from the source | Unit | pass | not run | not run | not run |
packages/image/test/card-build.test.ts | |||||
| every row of the card engine table: nothing draws without the engine installed and listed, no server without it in dependencies, an edge build warns | Unit | pass | not run | not run | not run |
| the build reads a card's image where the live endpoint does, the server's assets: a client-only file or a static/ file is refused | Unit | pass | not run | not run | not run |
| the card's module > a rendered chunk gets each card's digest and the list of the cards' own chunks | Unit | pass | not run | not run | not run |
| the card's module > a server card's chunk names the files its engine reads by a path no tracer follows (satori's harfbuzz wasm), each a URL relative to the chunk | Unit | pass | not run | not run | not run |
| the card's module > in dev, each load of a card names it anew | Unit | pass | not run | not run | not run |
| the card's module > the browser gets the refusal; the server the spec, the component under the og-card query, and the engine where it runs | Unit | pass | not run | not run | not run |
| the digest > a child component, its CSS or a font changes it; a module the card does not import does not | Unit | pass | not run | not run | not run |
| the digest > a package's font or module whose bytes change at the same path (npm or yarn: no version in it) changes it; a file's built code does not (a cold and a warm build differ there) | Unit | pass | not run | not run | not run |
| the digest > the CSS a card's component compiles to changes it (a Tailwind or PostCSS config change), and the rest of its built code does not | Unit | pass | not run | not run | not run |
| the macro > a card call becomes an import of its module, named by its arguments, which records the card | Unit | pass | not run | not run | not run |
| the macro > a card call in a component's markup is left as is, for ogygia's macro_in_markup | Unit | pass | not run | not run | not run |
| the macro > a package font resolves from the file that names it | Unit | pass | not run | not run | not run |
| the macro > what a card cannot be drawn from fails the build, coded | Unit | pass | not run | not run | not run |
packages/image/test/card-draw-settings.test.ts | |||||
| a card's digest holds the versions of satori, satori-html and resvg the app has | Unit | pass | not run | not run | not run |
| a card's name holds the draw version: another version names the same card and props anew | Unit | pass | not run | not run | not run |
| a change to what a card asks of sharp, satori or resvg bumps CARD_DRAW_VERSION, so no card name keeps an old PNG | Unit | pass | not run | not run | not run |
packages/image/test/card-endpoint-read.test.ts | |||||
| a card's image of the build is read by the URL read() takes for its tail, with no query, whatever query the markup's URL or dev's import carries | Unit | pass | not run | not run | not run |
packages/image/test/card-endpoint.test.ts | |||||
| a live card whose image the remote host refuses answers the remote's status, not a 500 for the card | Unit | pass | not run | not run | not run |
packages/image/test/card-images.test.ts | |||||
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a failure of the server’s own (out of memory) is not a broken file, whoever reports it | Unit | pass | not run | not run | not run |
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a file cut short (avif) is SourceUnreadable to the fitter and to an encode | Unit | pass | not run | not run | not run |
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a file cut short (gif) is SourceUnreadable to the fitter and to an encode | Unit | pass | not run | not run | not run |
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a file cut short (jpeg) is SourceUnreadable to the fitter and to an encode | Unit | pass | not run | not run | not run |
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a file cut short (png) is SourceUnreadable to the fitter and to an encode | Unit | pass | not run | not run | not run |
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a file cut short (tiff) is SourceUnreadable to the fitter and to an encode | Unit | pass | not run | not run | not run |
| a broken file is one rule: SourceUnreadable, for a card’s fitter and an encode alike > a file cut short (webp) is SourceUnreadable to the fitter and to an encode | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a data: URL reaches satori under the type its bytes are, not the one it declares | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a file resvg cannot draw never reaches it: a fit that hands back a CMYK JPEG or a 16-bit PNG is refused, coded | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a link's href (a card made from page markup) is no image: never read, and the card draws | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a server that fits no image (sharp makes no file there) refuses a card that names one, coded, before it reads the image or draws | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small '16-bit grey PNG' on a card draws its own pixels, as an <img> and as a background url() (resvg draws a CMYK JPEG as nothing and reads no colour profile) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small '16-bit PNG' on a card draws its own pixels, as an <img> and as a background url() (resvg draws a CMYK JPEG as nothing and reads no colour profile) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small 'CMYK JPEG' on a card draws its own pixels, as an <img> and as a background url() (resvg draws a CMYK JPEG as nothing and reads no colour profile) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small 'Display P3 JPEG' on a card draws its own pixels, as an <img> and as a background url() (resvg draws a CMYK JPEG as nothing and reads no colour profile) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small 'grey PNG' on a card draws its own pixels, as an <img> and as a background url() (resvg draws a CMYK JPEG as nothing and reads no colour profile) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small avif on a card draws its own pixels, as an <img> and as a background url() (resvg draws no WebP, AVIF or TIFF; every type remoteImage() takes, a card takes) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small file of huge dimensions (a 20000 x 20000 PNG header) is refused, coded, before anything decodes it | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small gif on a card draws its own pixels, as an <img> and as a background url() (resvg draws no WebP, AVIF or TIFF; every type remoteImage() takes, a card takes) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small jpeg on a card draws its own pixels, as an <img> and as a background url() (resvg draws no WebP, AVIF or TIFF; every type remoteImage() takes, a card takes) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small png on a card draws its own pixels, as an <img> and as a background url() (resvg draws no WebP, AVIF or TIFF; every type remoteImage() takes, a card takes) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small tiff on a card draws its own pixels, as an <img> and as a background url() (resvg draws no WebP, AVIF or TIFF; every type remoteImage() takes, a card takes) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a small webp on a card draws its own pixels, as an <img> and as a background url() (resvg draws no WebP, AVIF or TIFF; every type remoteImage() takes, a card takes) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a style's url( with no closing paren is refused, coded, and satori never calls fetch | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > a style's url(data: with no closing paren is refused, coded, before the draw: no data: image reaches satori unfitted (a 9000 x 9000 PNG) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > an <img> hands satori its bytes, not a data: text (satori keeps every data: text it is given, up to 500 of them, for the process's life) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > an <img> read as a Buffer that is a view into a larger pool hands satori that image's bytes alone, not the pool's | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > an image larger than the card reaches satori fitted to it: covering the card, at most four times its pixels | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > an image of a type resvg cannot draw never reaches it: a fit that hands one back is refused, coded | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > an SVG data: URL is refused in a card, coded (it can name addresses of its own) | Unit | pass | not run | not run | not run |
| a card's images, as satori is handed them > resvg draws a JPEG only when it is 8-bit, grey or RGB, baseline or progressive: no 12-bit, arithmetic, lossless or CMYK file passes | Unit | pass | not run | not run | not run |
packages/image/test/card-remote-live.test.ts | |||||
| a live card that shows a remote image is never sent immutable: it is kept for remote.maxAge, and past it the host's new picture is drawn | Unit | pass | not run | not run | not run |
| a live card that shows a remote image, kept in memory (no store), is sent with what is left of its window, not its first ask’s max-age | Unit | pass | not run | not run | not run |
| a live card that shows a remote image, past its window while the host is down, is the last window’s file for 30 s; with none kept, the host’s refusal | Unit | pass | not run | not run | not run |
| a live card that shows only the build’s images stays immutable | Unit | pass | not run | not run | not run |
| a live card whose image fails to fit for a reason of the server’s own (out of memory) fails that ask only: 500, and remoteImage() of the same URL still fetches and is made | Unit | pass | not run | not run | not run |
| a live card whose remote image does not decode is that URL’s failure, as for remoteImage(): 502, remembered (one fetch), said once | Unit | pass | not run | not run | not run |
packages/image/test/card.test.ts | |||||
| components compiled for a card > each asks for its CSS in the render, whatever options it had | Unit | pass | not run | not run | not run |
| components compiled for a card > only a .svelte file under the og-card query is one | Unit | pass | not run | not run | not run |
| drawing > a card draws as a PNG of its own size, with its CSS from its head | Unit | pass | not run | not run | not run |
| drawing > a card's image URLs reach its realm as the markup means them: & in a query, " around a url() | Unit | pass | not run | not run | not run |
| drawing > a class that looks like a Tailwind utility is only a class: the CSS is the component own | Unit | pass | not run | not run | not run |
| drawing > a failure that is no CSS refusal (a font that does not load) keeps its own error, not image_card_css | Unit | pass | not run | not run | not run |
| drawing > an image a card's markup names at an address the app does not read it from is refused, coded, and never fetched | Unit | pass | not run | not run | not run |
| drawing > an image the card's realm reads (a listed remote host, an asset of the build) is drawn from bytes ogygia hands satori | Unit | pass | not run | not run | not run |
| drawing > an SVG <image>'s href, a mask's url() and a data: SVG in a card are the realm's to read or refuse: satori never calls fetch | Unit | pass | not run | not run | not run |
| drawing > character references in text are decoded once, after the markup is read | Unit | pass | not run | not run | not run |
| drawing > CSS satori cannot draw is image_card_css, naming the property and the card | Unit | pass | not run | not run | not run |
| fonts > a font file names its family, weight and style | Unit | pass | not run | not run | not run |
| fonts > a WOFF2 file, or one that is no font, does not read | Unit | pass | not run | not run | not run |
| fonts > any bytes a font file holds read as a face or FontUnreadable, never another error (property) | Unit | pass | not run | not run | not run |
| props > any JSON object reads back from its text as itself | Unit | pass | not run | not run | not run |
| props > props that are not JSON, or past the size a URL carries, are image_card_props | Unit | pass | not run | not run | not run |
| props > the id changes with the digest, the size and the props, and with nothing else | Unit | pass | not run | not run | not run |
| props > the same props written in any key order are one JSON text, one id and one tail | Unit | pass | not run | not run | not run |
| the descriptor and its recipes > a card mints its own-size PNG, and its recipes carry the card and its props in a .card/ tail | Unit | pass | not run | not run | not run |
| the descriptor and its recipes > a tail that is not a card names none | Unit | pass | not run | not run | not run |
| the descriptor and its recipes > its recipe head names the id and the size like any other source | Unit | pass | not run | not run | not run |
| the descriptor and its recipes > with no server realm (the browser), a card is image_no_server | Unit | pass | not run | not run | not run |
| the share image dev rule > names an og:image or twitter:image that is AVIF or WebP, and no PNG, JPEG or other meta | Unit | pass | not run | not run | not run |
packages/image/test/cloudflare.test.ts | |||||
| a change to the binding's steps bumps STEPS_VERSION, so the Worker cache never answers with files made the old way | Unit | pass | not run | not run | not run |
| a link mirrors, then turns, as sharp does | Unit | pass | not run | not run | not run |
| a live recipe the links can make is named by its link; else the endpoint makes it; else the render fails naming the encoder and the need | Unit | pass | not run | not run | not run |
| a recipe's needs: the box, where it keeps, each op, the format | Unit | pass | not run | not run | not run |
| a remote source is never made larger than it is, by a link or the binding: its box is fit=crop, which only shrinks | Unit | pass | not run | not run | not run |
| Cloudflare cannot make an entropy crop, a turn off the quarters, normalize, negate, gamma, tint, a hue or lightness change, or read an AVIF; its links cannot name a PNG | Unit | pass | not run | not run | not run |
| Cloudflare reads no AVIF source (Enterprise plans only), and its links name no PNG: a PNG from a PNG source keeps the source's format, from any other it is the binding's | Unit | pass | not run | not run | not run |
| cloudflare() links by default; links: false sends every file to the binding endpoint; sharp() links nothing and makes everything | Unit | pass | not run | not run | not run |
| cloudflare() refuses an unknown key, a links that is not a boolean, and a binding that is no name | Unit | pass | not run | not run | not run |
| in dev every file is the endpoint's, and a need the encoder cannot meet fails there as in production | Unit | pass | not run | not run | not run |
| the binding blurs and sharpens the box it made, as sharp does: a big source blurred and cut is as soft as sharp makes it | Unit | pass | not run | not run | not run |
| the binding makes the same recipe in steps, in sharp's order: mirror, turn, box, tone | Unit | pass | not run | not run | not run |
| the capability table, row by row | Unit | pass | not run | not run | not run |
| the link of each recipe shape, options in one fixed order | Unit | pass | not run | not run | not run |
packages/image/test/encode-settings.test.ts | |||||
| a change to what sharp is asked for a file bumps ENCODER_VERSION, so no built name keeps old bytes | Unit | pass | not run | not run | not run |
| a change to what sharp is asked for a placeholder bumps PLAN_VERSION, so no kept plan keeps the old one | Unit | pass | not run | not run | not run |
| an AVIF effort that is no whole number from 0 to 9, or an unknown key, fails the build with a code | Unit | pass | not run | not run | not run |
| sharp({ effort: { avif } }) is what sharp is asked for an AVIF file, by the endpoint's maker and the build alike; the default is 2 | Unit | pass | not run | not run | not run |
packages/image/test/encoder-check.test.ts | |||||
| a build with no node_modules folder (Yarn PnP) goes on when Node resolves sharp from the app | Unit | pass | not run | not run | not run |
| a Cloudflare build that lists no encoder fails, coded, naming cloudflare() and sharp() for prerendered images only | Unit | pass | not run | not run | not run |
| a Cloudflare Workers adapter is Cloudflare for cloudflare() too | Unit | pass | not run | not run | not run |
| a node server build fails, coded, when sharp is installed but not in the app's dependencies, so the adapter would bundle it | Unit | pass | not run | not run | not run |
| a node server build fails, coded, when the app does not install sharp itself | Unit | pass | not run | not run | not run |
| a node server build with sharp in the app's dependencies goes on | Unit | pass | not run | not run | not run |
| a static build, which runs no server, needs sharp installed and listed, devDependencies is enough | Unit | pass | not run | not run | not run |
| an edge build with cloudflare() says nothing, and needs sharp only to build, devDependencies being enough | Unit | pass | not run | not run | not run |
| an edge build with sharp() listed says once that its server cannot encode and names cloudflare(), and needs sharp only to build | Unit | pass | not run | not run | not run |
| any other edge build that lists no encoder fails too, coded, naming sharp() for prerendered images only; with sharp() it warns | Unit | pass | not run | not run | not run |
| every row of the encoder table: nothing goes on without sharp listed and installed, and no server without it in dependencies | Unit | pass | not run | not run | not run |
| the dev server fails, coded, when the app does not install sharp | Unit | pass | not run | not run | not run |
| with NODE_PATH set, a sharp that Node finds with no node_modules folder at or above the app is not the app installing it | Unit | pass | not run | not run | not run |
packages/image/test/kit3-prerender.test.ts | |||||
| on Kit 3, no prerendered page keeps the build's mark, in Kit's output or the adapter's | Unit | pass | not run | not run | not run |
| on Kit 3, the build writes every image file a prerendered page names, under its own path | Unit | pass | not run | not run | not run |
packages/image/test/kit3-watch-remote.test.ts | |||||
| on Kit 3, a watch rebuild of a page with a remote image finds the file the last build named by the image's bytes | Unit | pass | not run | not run | not run |
packages/image/test/kit3-watch.test.ts | |||||
| on Kit 3, a watch rebuild leaves no prerendered page with the build's mark | Unit | pass | not run | not run | not run |
| on Kit 3, a watch rebuild whose page names an image file no build made stops before the adapter, out loud | Unit | pass | not run | not run | not run |
| on Kit 3, a watch rebuild writes every image file its prerendered pages name | Unit | pass | not run | not run | not run |
packages/image/test/layout.test.ts | |||||
| lay_out > a breakpoint within a tenth of a width the layout names makes no file of its own | Unit | pass | not run | not run | not run |
| lay_out > a crop names where it keeps; the centre is the default and goes unsaid | Unit | pass | not run | not run | not run |
| lay_out > a fixed square avatar from a wide photo is cut square, never wider than 2× its box | Unit | pass | not run | not run | not run |
| lay_out > a height alone keeps the aspect ratio | Unit | pass | not run | not run | not run |
| lay_out > a position on an image whose shape is kept changes nothing | Unit | pass | not run | not run | not run |
| lay_out > a width and a height crop the files to that box | Unit | pass | not run | not run | not run |
| lay_out > an animated source moves as WebP only, with a still of its first frame for reduced motion | Unit | pass | not run | not run | not run |
| lay_out > an aspect crops every file to that shape, no wider than the source covers | Unit | pass | not run | not run | not run |
| lay_out > an authored sizes replaces the derived one | Unit | pass | not run | not run | not run |
| lay_out > an SVG is its own file: no srcset, no sizes, no recipe | Unit | pass | not run | not run | not run |
| lay_out > constrained never asks for a raster wider than its pixels | Unit | pass | not run | not run | not run |
| lay_out > constrained with a width offers its 1× and 2× and the breakpoints under 2× | Unit | pass | not run | not run | not run |
| lay_out > constrained with no width is the intrinsic width | Unit | pass | not run | not run | not run |
| lay_out > fixed asks for exactly 1× and 2× of its box, and no sizes | Unit | pass | not run | not run | not run |
| lay_out > fullWidth offers every breakpoint at 100vw | Unit | pass | not run | not run | not run |
| lay_out > no still is offered when the encoders cannot make one | Unit | pass | not run | not run | not run |
| lay_out > one format renders a plain img: no sources | Unit | pass | not run | not run | not run |
| lay_out > quality: the request over the source over the plugin | Unit | pass | not run | not run | not run |
| lay_out > the preload names the best format | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a box taller than the source can fill is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a crop position that is not one is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a descriptor from outside the build with a placeholder that closes its url() is refused with a code | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a descriptor from outside the build with a placeholder that is not a WebP data URL is refused with a code | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a descriptor from outside the build with an empty id is refused with a code | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a descriptor from outside the build with an id that is not a recipe id is refused with a code | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a fixed box taller than the source can fill is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a fractional aspect asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a fractional fixed box asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a fractional height alone asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a fractional width asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a height far past the source, with no width asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a negative width is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a position that is not one, with no crop is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a quality above 100 is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a quality that is not whole is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a source wider than any file the endpoint makes, laid out at its own width, is refused with a code | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a very tall aspect the source can still fill asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a width that is not a number is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a width under one pixel asks only for files the endpoint makes, at whole sizes | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a zero aspect is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > a zero width is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > an aspect taller than the source can fill is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > an aspect that does not read is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
| lay_out agrees with the endpoint > an infinite height is refused with a code, naming the prop | Unit | pass | not run | not run | not run |
packages/image/test/macro.test.ts | |||||
| rewrite_image_calls > a call becomes an import of the file under the og-image query | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a call in a component template is left as is, for ogygia's macro_in_markup | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a docs page that writes the call as text in its markup is no call (a <code> sample) | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a glob stays local, and a twin is a file of the app | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a glob that matches nothing fails the build | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a hand-written og-image query that is not the macro’s fails with its code | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a listed remote URL is a source: an import of the remote module, options kept | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a missing file fails the build, naming it | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a misspelled option fails instead of being ignored | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a module without the marker is returned as it is | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a URL on a host the app does not list, or with no hosts at all, fails naming the line to add | Unit | pass | not run | not run | not run |
| rewrite_image_calls > a variable path fails: the build reads literals | Unit | pass | not run | not run | not run |
| rewrite_image_calls > glob becomes an eager import.meta.glob under the query | Unit | pass | not run | not run | not run |
| rewrite_image_calls > in a component the import lands in the script that calls | Unit | pass | not run | not run | not run |
| rewrite_image_calls > options travel in the query, read back as written | Unit | pass | not run | not run | not run |
| rewrite_image_calls > the words in a component template’s text are not a call | Unit | pass | not run | not run | not run |
| rewrite_image_calls > warm names presets the config declares, one or a list; any other name fails the build | Unit | pass | not run | not run | not run |
| the image macro in dev > a call in a markdown page's <script> is rewritten, in the regions ogygia hands the macro | Unit | pass | not run | not run | not run |
| the image macro in dev > a call to a missing file still watches it, so adding the file transforms the module again | Unit | pass | not run | not run | not run |
| the image macro in dev > the macro answers with edits, so a module that uses it keeps its source map | Unit | pass | not run | not run | not run |
packages/image/test/markdown-cache-key.test.ts | |||||
| the markdown extension cache key > a change to the image plugin’s code is a new key, so content never serves a doc it compiled before | Unit | pass | not run | not run | not run |
packages/image/test/markdown.test.ts | |||||
| finish names every image file a post shows, body and frontmatter, so a kept compile of the post is checked again once one is gone | Unit | pass | not run | not run | not run |
| frontmatter images > a ./ or ../ path to a missing image fails the build, naming it | Unit | pass | not run | not run | not run |
| frontmatter images > a ./ path to an image becomes a descriptor import, in place in the metadata | Unit | pass | not run | not run | not run |
| frontmatter images > a frontmatter path is a file path: a % in it is not an escape | Unit | pass | not run | not run | not run |
| frontmatter images > a value with no ./ or ../ prefix stays a string, even when it ends in an image extension | Unit | pass | not run | not run | not run |
| frontmatter images > nested and listed paths become descriptors too | Unit | pass | not run | not run | not run |
| markdown body images > a body image and a frontmatter URL on a listed host become descriptors; an unlisted one stays plain | Unit | pass | not run | not run | not run |
| markdown body images > a local image renders through <Og__Img>, imported under the og-image query | Unit | pass | not run | not run | not run |
| markdown body images > a markdown snippet (no file of its own) naming a local image fails with its own code, not image_not_found | Unit | pass | not run | not run | not run |
| markdown body images > a missing local image fails the build, naming it | Unit | pass | not run | not run | not run |
| markdown body images > a name with a space is imported by its real name, not its URL-encoded one | Unit | pass | not run | not run | not run |
| markdown body images > a non-ASCII name is imported by its real name, not its URL-encoded one | Unit | pass | not run | not run | not run |
| markdown body images > a path whose escapes are not UTF-8 fails with a coded message, not a URIError | Unit | pass | not run | not run | not run |
| markdown body images > a prose preset, when the config has one, is how a body image is shown | Unit | pass | not run | not run | not run |
| markdown body images > a raw HTML <img> naming a local file fails the build, pointing at ![]() | Unit | pass | not run | not run | not run |
| markdown body images > a raw HTML <img> of a remote or site-absolute file is left alone | Unit | pass | not run | not run | not run |
| markdown body images > a remote or site-absolute image is left as a plain <img> | Unit | pass | not run | not run | not run |
| markdown body images > alt and title text cannot close the attribute or open an expression | Unit | pass | not run | not run | not run |
| markdown body images > image() offers the extension on its Vite plugin api, and markdown: false offers none | Unit | pass | not run | not run | not run |
| markdown body images > markdown.width rides as the image width; the source import carries no width | Unit | pass | not run | not run | not run |
| markdown body images > with markdown.animated alone, a still image is as wide as itself | Unit | pass | not run | not run | not run |
| markdown body images > with markdown.animated and markdown.width, the width is a still image’s only, so the preset’s width reaches a moving one | Unit | pass | not run | not run | not run |
| markdown body images > with markdown.animated, a moving source takes that preset and a still one the prose preset | Unit | pass | not run | not run | not run |
packages/image/test/markup-names.test.ts | |||||
| <Img>'s data-og-img is core's OG_IMG, in its markup and in its CSS | Unit | pass | not run | not run | not run |
| every data-og-* name <Img> writes is one of core's markup names | Unit | pass | not run | not run | not run |
packages/image/test/namer-bundle.test.ts | |||||
| a cloudflare() app's namer holds Cloudflare's link code and none of Vercel's | Unit | pass | not run | not run | not run |
| a vercel() app's namer holds Vercel's link code and none of Cloudflare's | Unit | pass | not run | not run | not run |
packages/image/test/none-maker.test.ts | |||||
| a PNG asked for at its own size, as a PNG, is handed back as it is | Unit | pass | not run | not run | not run |
| any other ask is refused, saying no encoder makes files here | Unit | pass | not run | not run | not run |
packages/image/test/options.test.ts | |||||
| an encoder list is in order of priority: one platform, at most one maker, and nothing after sharp(), which makes every file | Unit | pass | not run | not run | not run |
| an unknown markdown key still fails, naming the known ones | Unit | pass | not run | not run | not run |
| encoder takes sharp(), cloudflare(), vercel() or a list of encoders, each at most once | Unit | pass | not run | not run | not run |
| markdown.animated names a preset the config declares | Unit | pass | not run | not run | not run |
| markdown.animated naming no declared preset fails the build, listing the declared ones | Unit | pass | not run | not run | not run |
packages/image/test/peers.test.ts | |||||
| the least place any peer is listed counts | Unit | pass | not run | not run | not run |
| with NODE_PATH set, a card engine package Node finds with no node_modules folder at or above the app is not the app installing it | Unit | pass | not run | not run | not run |
packages/image/test/plan.test.ts | |||||
| plan_image > a file is encoded at its box in its format, cut to the box | Unit | pass | not run | not run | not run |
| plan_image > a file that is not an image fails with its code | Unit | pass | not run | not run | not run |
| plan_image > a long screen recording (1200×800, 300 frames) plans, and its WebP keeps every frame | Unit | pass | not run | not run | not run |
| plan_image > a photo: its shown size, its format and a placeholder, and no file encoded | Unit | pass | not run | not run | not run |
| plan_image > a quarter-turn rotate op swaps the shown size | Unit | pass | not run | not run | not run |
| plan_image > a still image past the pixel limit fails at build with a code naming the file | Unit | pass | not run | not run | not run |
| plan_image > a transparent image gets no placeholder: the blur would show through it | Unit | pass | not run | not run | not run |
| plan_image > an animated GIF is planned as moving, and its WebP keeps every frame | Unit | pass | not run | not run | not run |
| plan_image > an animation whose frames add up past what an encode may read fails at build with a code naming the file | Unit | pass | not run | not run | not run |
| plan_image > an image whose header reads but whose pixels do not fails with its code | Unit | pass | not run | not run | not run |
| plan_image > an SVG is planned at its own size, never rasterized | Unit | pass | not run | not run | not run |
| plan_image > EXIF orientation is applied: a portrait stored sideways reports its shown size | Unit | pass | not run | not run | not run |
| plan_image > placeholder: false makes none | Unit | pass | not run | not run | not run |
| plan_image > the id names the file's bytes alone: other settings keep the id and get their own plan | Unit | pass | not run | not run | not run |
| plan_image > the placeholder is a tiny WebP made at build, its data URL at most 400 bytes, in the image's shape | Unit | pass | not run | not run | not run |
| plan_image > the placeholder paints as a background with no decode at render | Unit | pass | not run | not run | not run |
| plan_image > two files with the same bytes are one source: the descriptor, not the plan, names the file | Unit | pass | not run | not run | not run |
packages/image/test/plugin.test.ts | |||||
| <Img> is handed Kit's base, assets and app folder, read from Kit's own plugin | Unit | pass | not run | not run | not run |
| a leg is Kit's server leg by its environment, not the config's build.ssr: Kit 3 builds every leg from one config | Unit | pass | not run | not run | not run |
| a platform's encoder on another adapter fails the server build, as its links and maker exist only on that platform | Unit | pass | not run | not run | not run |
| a remote image resolves to its file in the build cache, loads as a source, and the server build lists it for the endpoint | Unit | pass | not run | not run | not run |
| cloudflare() makes files with its Images binding in a build and with sharp in dev, and names live files by its links in a build only | Unit | pass | not run | not run | not run |
| Kit 3's service worker leg, built after the build's end, starts no handoff of its own: no new mark, run or maker | Unit | pass | not run | not run | not run |
| on adapter-auto, the message says to list the platform adapter itself: auto cannot hand it the encoder config | Unit | pass | not run | not run | not run |
| only an app that lists vercel() gets the output check, run after the server build's other closeBundle hooks | Unit | pass | not run | not run | not run |
| the endpoint makes files with the maker the encoder names, sharp by default, and no encoder links files | Unit | pass | not run | not run | not run |
| the server reads no original under src/lib/server or in a test folder, and the macro says so | Unit | pass | not run | not run | not run |
| the theme stylesheet resolves to a file path, with and without a query | Unit | pass | not run | not run | not run |
| vercel() alone has no endpoint maker; its sizes bound every file's width; a list keeps sharp's endpoint | Unit | pass | not run | not run | not run |
| vercel() alone offers no still of a moving image, and its server build says so once; a list with sharp() does | Unit | pass | not run | not run | not run |
| with vercel(), a source's own quality that vercel({ qualities }) does not list fails the build where the source is read, not each live render | Unit | pass | not run | not run | not run |
| without SvelteKit there are no paths to name files by: a coded error, not a silent default | Unit | pass | not run | not run | not run |
packages/image/test/recipe.test.ts | |||||
| recipes > a format the endpoint does not make, a zero size or a quality over 100 is no recipe | Unit | pass | not run | not run | not run |
| recipes > a name with a space, an accent or a comma is escaped in the URL and read back as itself | Unit | pass | not run | not run | not run |
| recipes > a recipe path reads back as the recipe it was written from | Unit | pass | not run | not run | not run |
| recipes > a tail that climbs out of its folder is no recipe | Unit | pass | not run | not run | not run |
| recipes > the tail is the asset path without origin, base, query or leading slash, decoded | Unit | pass | not run | not run | not run |
packages/image/test/remote-image-links.test.ts | |||||
| with cloudflare() links, a remote image on an unlisted host gets the endpoint's URL, which refuses it with a code | Unit | pass | not run | not run | not run |
| with vercel() links, a remote image on an unlisted host gets the endpoint's URL, which refuses it with a code | Unit | pass | not run | not run | not run |
packages/image/test/remote-image.test.ts | |||||
| private addresses > a *. entry never matches an address; only an entry that names the address does | Unit | pass | not run | not run | not run |
| private addresses > a connection to a host listed only by *. gets its addresses only when every one is public; a named host gets any | Unit | pass | not run | not run | not run |
| private addresses > an IPv4 address and the IPv6 addresses that carry it (mapped, NAT64, 6to4) are one answer (property) | Unit | pass | not run | not run | not run |
| private addresses > loopback, private, link-local (cloud metadata), shared, reserved and multicast addresses are private; a public one is not | Unit | pass | not run | not run | not run |
| remoteImage() > a descriptor of the URL: id r and a hash of the URL and version, its box, its format by extension, no placeholder | Unit | pass | not run | not run | not run |
| remoteImage() > another URL or another version is another source; the same URL written another way is the same | Unit | pass | not run | not run | not run |
| remoteImage() > its recipes name the URL in a .remote/ tail that reads back as the URL, and no other tail does | Unit | pass | not run | not run | not run |
| remoteImage() > refuses what it cannot name: no http(s) URL, a user in it, a box that is not whole pixels, an alt or version of another kind | Unit | pass | not run | not run | not run |
| remoteImage() > with cloudflare() links, a remote image's link names its whole URL after the options | Unit | pass | not run | not run | not run |
| sha256 > is SHA-256 (property, against node:crypto) | Unit | pass | not run | not run | not run |
packages/image/test/remote-request.test.ts | |||||
| the image endpoint, for a remote image > a .remote/ tail changed after signing, or the id beside it, is refused by the signature | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > a file is made from the URL's bytes, its tail the URL, answered to be kept for at most remote.maxAge, never forever | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > a file kept in memory (no store) is sent with what is left of its window, not its first ask's max-age | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > a host listed only by *. that resolves to a private address is never connected to; one the list names itself is | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > a remote URL that failed is not fetched again for a while: its files answer the remembered status, said once, and it is asked again once the memory ends | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > a small remote image the CMS says is huge is never made larger than it is | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > a URL on a host remote.hosts does not list is 404 and kept nowhere, though the app signed it (under an older list), and is never fetched | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > an encode that fails on its own (out of memory under load) fails that file only: the URL's other files, and the same file asked again, are made | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > an original that does not decode is the URL's failure: every file of it answers 502, remembered, from one fetch | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > an original whose header reads but whose pixels are cut short is the URL's failure: 502, remembered (one fetch), said once | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > different URLs' windows end at different instants, so a server's remote files do not all expire at once | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > past its window while the host is down, a file is the last window's for 30 s; with none kept, the host's refusal | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > past its window, an original whose pixels are now cut short is the last window's file for 30 s | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > past maxBytes is 413, past the timeout 504, an error status or not an image 502, a redirect off the list 404: each kept nowhere, each said | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > slow remote hosts hold no encode slot: a file whose bytes are here is made while they wait | Unit | pass | not run | not run | not run |
| the image endpoint, for a remote image > the files of one URL asked at once share one fetch; one asked again in its window is kept, and made from a new fetch in the next window | Unit | pass | not run | not run | not run |
| the most pixels a file may have > a declared size past the pixels one frame may have is refused by remoteImage(), and such a recipe is no recipe | Unit | pass | not run | not run | not run |
packages/image/test/remote.test.ts | |||||
| hosts > *. lists every name below, one label or more, never the name itself | Unit | pass | not run | not run | not run |
| hosts > a *. entry over a name above a shared suffix (so over every tenant of it) is refused; one over a single tenant is not | Unit | pass | not run | not run | not run |
| hosts > a *. entry over a public suffix anyone can host under is refused; one over a name below it, or that name itself, is not | Unit | pass | not run | not run | not run |
| hosts > a *. entry over a shared storage or image CDN name (a Vercel Blob store, a Bunny pull zone, an imgix source) is refused; one store of it is not | Unit | pass | not run | not run | not run |
| hosts > a name inside another host's name is not that host | Unit | pass | not run | not run | not run |
| hosts > a name lists that name, over https, on the default port | Unit | pass | not run | not run | not run |
| hosts > a public suffix written with DNS's trailing dot, or a regional storage name, is a public suffix too | Unit | pass | not run | not run | not run |
| hosts > a URL whose host ends in a trailing dot is the host without it | Unit | pass | not run | not run | not run |
| hosts > a URL with a user or password in it is never listed | Unit | pass | not run | not run | not run |
| hosts > an entry with a path, a wildcard over an address or a top-level name, or a range is refused | Unit | pass | not run | not run | not run |
| hosts > no pattern takes a host outside it (property) | Unit | pass | not run | not run | not run |
| hosts > one tenant of a regional storage name stays its own | Unit | pass | not run | not run | not run |
| hosts > plain http only from an entry that says http://, with its port | Unit | pass | not run | not run | not run |
| hosts > the line to add names exactly the refused host | Unit | pass | not run | not run | not run |
| hosts > the remote option is checked: hosts, limits, unknown keys | Unit | pass | not run | not run | not run |
| the fetch into the build cache > a body past maxBytes is dropped, counted as it streams or by its length | Unit | pass | not run | not run | not run |
| the fetch into the build cache > a first fetch keeps the bytes and their etag, named by the URL | Unit | pass | not run | not run | not run |
| the fetch into the build cache > a host that stops answering fails at the timeout | Unit | pass | not run | not run | not run |
| the fetch into the build cache > a redirect to a host the list does not name fails the build, naming both | Unit | pass | not run | not run | not run |
| the fetch into the build cache > a second build asks with the etag, and a 304 keeps the copy | Unit | pass | not run | not run | not run |
| the fetch into the build cache > an answer that is not an image, or an error status, fails with the reason | Unit | pass | not run | not run | not run |
| the fetch into the build cache > in dev the endpoint reads a remote original only from the remote folder, by its hashed name | Unit | pass | not run | not run | not run |
| the fetch into the build cache > offline with a copy kept: the copy, and image_remote_stale; offline with none: image_remote_failed | Unit | pass | not run | not run | not run |
| the fetch into the build cache > one process asks each URL once, however many modules name it | Unit | pass | not run | not run | not run |
| the fetch into the build cache > redirects are followed, each hop checked, at most 3 | Unit | pass | not run | not run | not run |
packages/image/test/render-no-server.test.ts | |||||
| on a server with no image server, a local, a remote and a card recipe are each image_no_server | Unit | pass | not run | not run | not run |
packages/image/test/render.test.ts | |||||
| a warmed preset asks the server for the files the build made | Unit | pass | not run | not run | not run |
| the same preset said over, another preset, or a source not warmed with it, is signed | Unit | pass | not run | not run | not run |
| with no server realm, a warmed preset names the files the build made, under the app folder at the base | Unit | pass | not run | not run | not run |
packages/image/test/server-after-build.test.ts | |||||
| a page rendered after the build wrote its files (an SPA fallback) > names a file the build wrote by its plain URL, with no mark, signing nothing | Unit | pass | not run | not run | not run |
| a page rendered after the build wrote its files (an SPA fallback) > names a remoteImage()'s file by the name the build gave it (its bytes), not the remote URL | Unit | pass | not run | not run | not run |
| a page rendered after the build wrote its files (an SPA fallback) > names its original for a file no prerendered page asked for, and notes nothing | Unit | pass | not run | not run | not run |
packages/image/test/server-assets-path.test.ts | |||||
| paths.assets > with paths.assets set to a CDN, a signed file is made from the original Kit serves there | Unit | pass | not run | not run | not run |
packages/image/test/server-boot.test.ts | |||||
| starting the image server realm loads no sharp or libvips, so a server without them boots | Unit | pass | not run | not run | not run |
packages/image/test/server-disk-half.test.ts | |||||
| a live server starts the image server realm without loading its disk half | Unit | pass | not run | not run | not run |
packages/image/test/server-no-encoder.test.ts | |||||
| a server where sharp cannot load starts, and its endpoint answers a coded 500 no cache keeps, said once | Unit | pass | not run | not run | not run |
packages/image/test/server-no-top-level-await.test.ts | |||||
| in dev, the realm module loads before its disk half does | Unit | pass | not run | not run | not run |
packages/image/test/server-prerender.test.ts | |||||
| a prerendered page > names each file under the app folder at the base, by its recipe, behind the build mark, signing nothing | Unit | pass | not run | not run | not run |
| a prerendered page > notes each recipe once, with the original it is made from, for the build to make | Unit | pass | not run | not run | not run |
| a prerendered page > notes the origin Kit prerenders at, which a page's absolute URLs resolve against, for the build's end | Unit | pass | not run | not run | not run |
| a prerendered page > reads no original and makes no file: the build makes every file the prerender names | Unit | pass | not run | not run | not run |
packages/image/test/server.test.ts | |||||
| the image server realm > a minted URL is a path under /__ogygia__/i/, signed by the app, the same on every render | Unit | pass | not run | not run | not run |
| the image server realm > a recipe rendered again reuses its signed URL: one signature per recipe, not per render | Unit | pass | not run | not run | not run |
| the image server realm > a remote image the server build fetched is an original the endpoint reads; any other name under the assets is not | Unit | pass | not run | not run | not run |
| the image server realm > a request for any other path passes through | Unit | pass | not run | not run | not run |
| the image server realm > a signed path that is not a recipe is not found | Unit | pass | not run | not run | not run |
| the image server realm > a signed recipe naming an original the app does not ship is not found | Unit | pass | not run | not run | not run |
| the image server realm > a signed URL asked with any method but GET or HEAD is answered 405 | Unit | pass | not run | not run | not run |
| the image server realm > a URL whose recipe was changed after signing is refused, naming why and the key | Unit | pass | not run | not run | not run |
| the image server realm > a URL with no signature, or a forged one, is refused | Unit | pass | not run | not run | not run |
| the image server realm > a warmed preset's recipe names the file the build made, signing nothing | Unit | pass | not run | not run | not run |
| the image server realm > an animated source stays animated | Unit | pass | not run | not run | not run |
| the image server realm > an original that cannot be decoded is a coded 500 no cache keeps, not a hung request | Unit | pass | not run | not run | not run |
| the image server realm > the endpoint makes the file the URL describes, kept forever | Unit | pass | not run | not run | not run |
| the image server realm > the second ask is read from the store, whole, with its length | Unit | pass | not run | not run | not run |
| the store a live server keeps > a file made long ago but asked for since is kept at the next start: files age by last use | Unit | pass | not run | not run | not run |
| the store a live server keeps > a folder at that place that others can write to, or a link, keeps nothing, and says so | Unit | pass | not run | not run | not run |
| the store a live server keeps > counts the files a past run left against its size | Unit | pass | not run | not run | not run |
| the store a live server keeps > every user of one folder in a process shares one store, so its size holds for a dev server's whole run | Unit | pass | not run | not run | not run |
| the store a live server keeps > is a folder only its user can open; another version's folder goes once unused for a week, and one in use by a server beside it stays | Unit | pass | not run | not run | not run |
| the store a live server keeps > keeps at most its size: the least recently asked files go first, while the server runs | Unit | pass | not run | not run | not run |
packages/image/test/settle-live.test.ts | |||||
| a second full line, after the first one emptied, is said again | Unit | pass | not run | not run | not run |
| a signed URL asked with a query string is sent to the bare URL, and nothing is made | Unit | pass | not run | not run | not run |
| an unsigned URL with a query string is still refused | Unit | pass | not run | not run | not run |
| many asks for one file at once make it once | Unit | pass | not run | not run | not run |
| more files asked at once than the server queues answer 503 with a retry-after, said once | Unit | pass | not run | not run | not run |
packages/image/test/settle-store-fails.test.ts | |||||
| a file the store cannot write is still answered, said once, and kept in memory instead | Unit | pass | not run | not run | not run |
packages/image/test/source-identity.test.ts | |||||
| a descriptor naming one source by id and another by file is never answered with the other file | Unit | pass | not run | not run | not run |
| a page that names a source's old content, asked after its original changed, gets no file: the new pixels are never kept under the old name | Unit | pass | not run | not run | not run |
| an edited source gets a new id, so a rebuild writes its new pixels under a new name | Unit | pass | not run | not run | not run |
packages/image/test/twins.test.ts | |||||
| options > dark, art, theme and a preset art are checked | Unit | pass | not run | not run | not run |
| options > the theme stylesheet shows the dark picture by the app's selectors, or the system's when no selector says | Unit | pass | not run | not run | not run |
| the picked row is the one a person expects > over twin sets × media states | Unit | pass | not run | not run | not run |
| the still > it needs a still, not an animation; Cloudflare makes it with anim=false | Unit | pass | not run | not run | not run |
| the still > its recipe head says -s after the position and before the ops, and reads back | Unit | pass | not run | not run | not run |
| twins > a twin media that cannot be joined with another, or a twin with twins, is image_prop_invalid | Unit | pass | not run | not run | not run |
| twins > an art crop of a source with a dark file comes first as the dark file at art and dark | Unit | pass | not run | not run | not run |
| twins > an art twin's own file keeps its own shape, not the request's crop | Unit | pass | not run | not run | not run |
| twins > each twin row carries its own box, so the page reserves the right space per media | Unit | pass | not run | not run | not run |
| twins > with image({ theme }), a dark file is a second picture, and each preload says its scheme | Unit | pass | not run | not run | not run |
packages/image/test/vercel.test.ts | |||||
| [vercel(), sharp()]: what Vercel can make is its link, anything else the sharp endpoint makes | Unit | pass | not run | not run | not run |
| a plugin or preset quality vercel() does not list fails the build, naming the list to add it to | Unit | pass | not run | not run | not run |
| a recipe's needs name the crop and a source Vercel would pass through | Unit | pass | not run | not run | not run |
| a remote image's Vercel link names its whole URL, escaped | Unit | pass | not run | not run | not run |
| in dev the sharp endpoint makes every file, and vercel() alone still fails a crop there | Unit | pass | not run | not run | not run |
| the adapter config check covers remote.hosts: remotePatterns reach each listed host and no other, and the line to pass has them | Unit | pass | not run | not run | not run |
| the adapter config check fails an images config that lets anyone ask Vercel for any quality or any path of the deployment | Unit | pass | not run | not run | not run |
| the adapter config check names each width, quality, format and host the build names that images lacks | Unit | pass | not run | not run | not run |
| the link: the original's URL escaped whole, the width snapped up to a size, the quality said or the format's own | Unit | pass | not run | not run | not run |
| Vercel only resizes: no crop, no position, no operation, no named PNG or JPEG, no GIF, TIFF or animated source, no still of one | Unit | pass | not run | not run | not run |
| vercel() alone: a crop, an op, a width past every size or a quality it does not allow fails the render, naming the need | Unit | pass | not run | not run | not run |
| vercel() hands the adapter its images config; its sizes default to small sizes and the breakpoints | Unit | pass | not run | not run | not run |
| vercel() opens Vercel's optimizer no wider than the app asks: the default qualities (AVIF 60, WebP 80) only, and the app's own originals only | Unit | pass | not run | not run | not run |
| vercel() refuses an unknown key, sizes that are not whole pixels, and qualities outside 1–100 | Unit | pass | not run | not run | not run |
| with widths, the layout asks only for those, or the whole source, each once | Unit | pass | not run | not run | not run |
packages/image/test/vite-no-sharp.test.ts | |||||
| image()'s Vite entry loads without sharp, and the build's first hook names the fix | Unit | pass | not run | not run | not run |