Skip to content

Commit 70a471f

Browse files
committed
fix: add missing apiType filtration
1 parent 79c97c8 commit 70a471f

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

test/helpers/registry/local.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,15 @@ export class LocalRegistry implements IRegistry {
162162
const { operations } = await this.getVersion(packageId || this.packageId, version) ?? {}
163163

164164
const versionOperations: ResolvedOperation[] = (operationsIds ?? [...operations?.keys() ?? []])
165-
?.filter(id => operations?.has(id))
166-
.map((id) => ({
167-
...operations!.get(id)!,
168-
data: includeData ? operations?.get(id)?.data : undefined,
169-
}))
165+
.flatMap(id => {
166+
const operation = operations?.get(id)
167+
return operation?.apiType === apiType
168+
? [{
169+
...operation,
170+
data: includeData ? operation.data : undefined,
171+
}]
172+
: []
173+
})
170174

171175
return { operations: versionOperations }
172176
}

test/prefix-groups.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import { BUILD_TYPE } from '../src'
1919

2020
const pkg = LocalRegistry.openPackage('apihub')
2121

22-
// TODO 15.04.25: remove skip
23-
describe.skip('Prefix Groups test', () => {
22+
describe('Prefix Groups test', () => {
2423
beforeAll(async () => {
2524
// generate missing versions/apihub folder contents
2625
await pkg.publish(pkg.packageId, {

0 commit comments

Comments
 (0)