test: remove obsolete xget skill script tests
This commit is contained in:
1 parent
b88cb8951a
commit
5fbaf83f25
1 file changed
-52
@@ -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'
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user