mirror of
https://github.com/k1tbyte/Wand-Enhancer.git
synced 2026-09-02 10:00:38 +00:00
a0b3968d33
Reorganize the panel around product capabilities and integrate the remote i18n feature from origin/master into the new structure. - Restructure src into capability features (app, trainer, library, remote-session, appearance, shared); move the bridge to bridge/src. - Add lingui-based UI localization and wrap remaining user-facing strings (Trans / msg macros); fix the 'END В·' mojibake. - Port WeMod cheat-metadata i18n: capture the access token from the snapshot's renderer in the bridge and fetch localized trainer_meta in remote-session.i18n; guarantee snapshot sync on token failure. - Wire vitest to the app's lingui/preact pipeline (mergeConfig).
32 lines
950 B
TypeScript
Vendored
32 lines
950 B
TypeScript
Vendored
import { describe, expect, it } from 'vitest';
|
|
|
|
import {
|
|
findSteamAppId,
|
|
getSteamClientIconUrl,
|
|
normalizeImageUrl,
|
|
} from '../scripts/default/installed-apps-sync/artwork.js';
|
|
|
|
describe('installed-apps renderer script models', () => {
|
|
it('normalizes captured artwork shapes without a Wand runtime', () => {
|
|
expect(normalizeImageUrl({ cover: { imageUrl: '//cdn.example/game.webp' } }))
|
|
.toBe('https://cdn.example/game.webp');
|
|
expect(normalizeImageUrl('file:///local/image.png')).toBeNull();
|
|
});
|
|
|
|
it('finds nested Steam metadata and builds the Wand client icon URL', () => {
|
|
const fixture = {
|
|
game: {
|
|
metadata: {
|
|
steam: {
|
|
appId: 1245620,
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
expect(findSteamAppId(fixture)).toBe('1245620');
|
|
expect(getSteamClientIconUrl(findSteamAppId(fixture)))
|
|
.toBe('https://api-cdn.wemod.com/steam_community/1245620/client_icon/96.webp');
|
|
});
|
|
});
|