MCPcopy
hub / github.com/jackwener/OpenCLI / evaluate

Function evaluate

clis/suno/utils.test.js:244–250  ·  view source on GitHub ↗
(script)

Source from the content-addressed store, hash-verified

242describe('suno utils — ensureSunoSession typed failures', () => {
243 function createSessionPage(sessionCheckResult) {
244 const evaluate = async (script) => {
245 if (script.includes('querySelectorAll')) return undefined;
246 if (script.includes('!!(window.Clerk && window.Clerk.session)')) return true;
247 if (script.includes('suno_device_id')) return 'device-id';
248 if (script.includes('/api/billing/info/')) return sessionCheckResult;
249 throw new Error(`unexpected evaluate script: ${script.slice(0, 80)}`);
250 };
251 return {
252 goto: async () => undefined,
253 wait: async () => undefined,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected