BREAKING(async): stop exporting ERROR_WHILE_MAPPING_MESSAGE (#5041)

This commit is contained in:
Yoshiya Hinosawa 2024-06-14 19:15:35 +09:00 committed by GitHub
parent b3be4c96cd
commit 3a930850c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@
// This module is browser compatible.
/** Error message emitted from the thrown error while mapping. */
export const ERROR_WHILE_MAPPING_MESSAGE = "Threw while mapping.";
const ERROR_WHILE_MAPPING_MESSAGE = "Threw while mapping.";
/**
* pooledMap transforms values from an (async) iterable into another async

View File

@ -1,6 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { delay } from "./delay.ts";
import { ERROR_WHILE_MAPPING_MESSAGE, pooledMap } from "./pool.ts";
import { pooledMap } from "./pool.ts";
import {
assert,
assertEquals,
@ -38,7 +38,7 @@ Deno.test("pooledMap() handles errors", async () => {
}
},
AggregateError,
ERROR_WHILE_MAPPING_MESSAGE,
"Threw while mapping.",
);
assertEquals(error.errors.length, 2);
assertStringIncludes(error.errors[0].stack, "Error: Bad number: 1");