fix(config): resolve remote hierarchy in memory for every profile
This commit is contained in:
@@ -5,12 +5,12 @@ import type { ConfigFetcher } from '../../YouleNexus/assets/framework/config/rem
|
||||
|
||||
test('resolveBootstrap:显式 hostKind 透传严格 RuntimeConfig,并保留 profile 元数据', async () => {
|
||||
const fetcher: ConfigFetcher = {
|
||||
async fetch() { return { data: { urlserver: '5.5.5.5:5000' } }; },
|
||||
async fetch() { return { player_server_tcp: '5.5.5.5:5000' }; },
|
||||
};
|
||||
const result = await resolveBootstrap({
|
||||
mode: 'debug', hostKind: 'h5', win: {}, search: '?profile=local', fetcher,
|
||||
});
|
||||
assert.equal(result.source, 'direct');
|
||||
assert.equal(result.source, 'remote');
|
||||
assert.equal(result.profile.name, 'local');
|
||||
assert.deepEqual(result.servers, ['ws://127.0.0.1:3088']);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user