From 5fbaf83f256d1785026641da27f3d8248d2b6a68 Mon Sep 17 00:00:00 2001 From: Xi Xu Date: Sun, 29 Mar 2026 02:55:23 +0800 Subject: [PATCH] test: remove obsolete xget skill script tests --- test/unit/xget-skill-script.test.js | 52 ----------------------------- 1 file changed, 52 deletions(-) delete mode 100644 test/unit/xget-skill-script.test.js diff --git a/test/unit/xget-skill-script.test.js b/test/unit/xget-skill-script.test.js deleted file mode 100644 index 7c5ba9c..0000000 --- a/test/unit/xget-skill-script.test.js +++ /dev/null @@ -1,52 +0,0 @@ -import { describe, expect, it } from 'vitest'; - -import { - createPlatformEntries, - extractPlatformsModule, - loadPlatformsFromSource -} from '../../skills/xget/scripts/xget.mjs'; - -describe('xget skill script', () => { - it('extracts platform data from the new platform catalog source', () => { - const source = `export const PLATFORM_CATALOG = { - gh: 'https://github.com', - 'cr-ghcr': 'https://ghcr.io' -}; - -export const PLATFORMS = PLATFORM_CATALOG; -`; - - expect(extractPlatformsModule(source)).toEqual({ - gh: 'https://github.com', - 'cr-ghcr': 'https://ghcr.io' - }); - }); - - it('still accepts the legacy PLATFORMS object source', () => { - const source = `export const PLATFORMS = { - npm: 'https://registry.npmjs.org' -}; -`; - - expect(extractPlatformsModule(source)).toEqual({ - npm: 'https://registry.npmjs.org' - }); - }); - - it('loads categorized platform entries from the extracted source', () => { - const entries = loadPlatformsFromSource(`export const PLATFORM_CATALOG = { - gh: 'https://github.com', - 'ip-openai': 'https://api.openai.com', - 'cr-ghcr': 'https://ghcr.io' -}; -`); - - expect(entries).toEqual( - createPlatformEntries({ - gh: 'https://github.com', - 'ip-openai': 'https://api.openai.com', - 'cr-ghcr': 'https://ghcr.io' - }) - ); - }); -});