fix(registry): align OCI and RubyGems API behavior and improve npm search result ordering

This commit is contained in:
2026-03-24 23:23:03 +00:00
parent abf7605e14
commit 5acd1d6166
8 changed files with 58 additions and 32 deletions

View File

@@ -324,13 +324,9 @@ tap.test('RubyGems: should retrieve versions JSON (GET /rubygems/api/v1/versions
expect(response.status).toEqual(200);
expect(response.headers['Content-Type']).toEqual('application/json');
const json = await streamToJson(response.body);
expect(json).toBeTypeOf('object');
expect(json).toHaveProperty('name');
expect(json.name).toEqual(testGemName);
expect(json).toHaveProperty('versions');
expect(json.versions).toBeTypeOf('object');
expect(json.versions.length).toBeGreaterThan(0);
expect(json).toBeInstanceOf(Array);
expect(json.length).toBeGreaterThan(0);
expect(json[0]).toHaveProperty('number');
});
tap.test('RubyGems: should retrieve dependencies JSON (GET /rubygems/api/v1/dependencies)', async () => {