Skip to content

Commit

Permalink
fix: fix types in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaclennan committed Jan 23, 2025
1 parent 0cd8238 commit 7a69f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/add-alerts-endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ const SUPPORTED_GEOMETRY_TYPES = /** @type {const} */ ([

/**
* @param {number} count
* @param {Array<typeof SUPPORTED_GEOMETRY_TYPES[number]>} [geometryTypes]
* @param {ReadonlyArray<typeof SUPPORTED_GEOMETRY_TYPES[number]>} [geometryTypes]
*/
function generateAlerts(count, geometryTypes = SUPPORTED_GEOMETRY_TYPES) {
if (count < geometryTypes.length) {
Expand All @@ -250,7 +250,7 @@ function generateAlerts(count, geometryTypes = SUPPORTED_GEOMETRY_TYPES) {
// Hacky, but should get the job done ensuring we have all geometry types in the test
const alerts = []
for (const geometryType of geometryTypes) {
/** @type {import('@comapeo/schema').RemoteDetectionAlert} */
/** @type {import('@comapeo/schema').RemoteDetectionAlert | undefined} */
let alert
while (!alert || alert.geometry.type !== geometryType) {
;[alert] = generate('remoteDetectionAlert', { count: 1 })
Expand Down

0 comments on commit 7a69f64

Please sign in to comment.