1
0
Fork 0
firefox/browser/modules/test/unit/test_LinksCache.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

22 lines
512 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* https://creativecommons.org/publicdomain/zero/1.0/
*/
"use strict";
const { LinksCache } = ChromeUtils.importESModule(
"resource:///modules/LinksCache.sys.mjs"
);
add_task(async function test_LinksCache_throws_on_failing_request() {
const cache = new LinksCache();
let rejected = false;
try {
await cache.request();
} catch (error) {
rejected = true;
}
Assert.ok(rejected, "The request should throw an error when failing.");
});