mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-02 07:21:33 -07:00
refactor: split anki-connect and stats-server resolvers into modules (#169)
This commit is contained in:
@@ -23,7 +23,17 @@ test('stats data uses the shared HTTP contract while native dialogs retain IPC',
|
||||
assert.doesNotMatch(ipcHandlers, /statsGet[A-Z]/);
|
||||
|
||||
const apiClient = read('stats/src/lib/api-client.ts');
|
||||
const statsServer = read('src/core/services/stats-server.ts');
|
||||
const statsServerRoutes = [
|
||||
'analytics-routes.ts',
|
||||
'integration-routes.ts',
|
||||
'library-routes.ts',
|
||||
'mining-routes.ts',
|
||||
].map((filename) => ({
|
||||
filename,
|
||||
source: read(`src/core/services/stats-server/${filename}`),
|
||||
}));
|
||||
assert.match(apiClient, /StatsHttpClient/);
|
||||
assert.match(statsServer, /statsJson/);
|
||||
for (const { filename, source } of statsServerRoutes) {
|
||||
assert.match(source, /statsJson/, `${filename} must use the shared HTTP contract`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user