Skip to content

Mahmoud-Qandeel/GetJobIQ / 01-FRAMEWORK/.agents/skills/jobdanmark-search

jobdanmark-search

Verified

Make sure to use this skill whenever the user mentions anything related to Danish job listings, job search in Denmark, finding work in Denmark, or job vacancies on Jobdanmark — even if they don't explicitly mention jobdanmark.dk. Also invoke this skill for questions about specific Danish job categories, municipalities, job types, or salaries in a job-search context. Trigger phrases include: danish jobs, jobs in denmark, find job denmark, job search denmark, danish job listings, jobdanmark, job opslag, find job, jobsøgning, ledige stillinger, stillingsopslag, job i Danmark, fuldtidsjob, deltidsjob, studiejob, praktikplads, elev, fleksjob, IT job denmark, sygeplejersker job, håndværker job, ingeniør job, pædagog job, kontor job, leder job, salg job, hotel job, kirke job, job aarhus, job københavn, job odense, job aalborg, job sjælland, job jylland, job fyn, jobkategorier denmark, ledige job, ansøgningsfrist, søg job, job opslaget, jobopslag, danish vacancies, work in denmark, employment denmark, job denmark, jobs near me denmark, apprentice denmark, internship denmark, part-time denmark, full-time denmark.

cli/tests/retry-backoff.test.ts

View on GitHub
import { afterEach, describe, expect, test } from "bun:test";
import { apiFetch, apiPost } from "../src/helpers";

// The portal contract requires backoff on 429/5xx. These tests pin the retry
// loop offline: a stubbed fetch counts attempts, and a stubbed setTimeout
// fires immediately so the exhaustion case does not sleep through the real
// 500ms -> 5s backoff schedule. apiFetch and apiPost carry separate copies of
// the loop, so both are exercised to keep them from drifting apart.

const originalFetch = globalThis.fetch;
const originalSetTimeout = globalThis.setTimeout;

afterEach(() => {
  globalThis.fetch = originalFetch;
  globalThis.setTimeout = originalSetTimeout;
});

function instantTimers() {
  globalThis.setTimeout = ((fn: () => void) =>
    originalSetTimeout(fn, 0)) as unknown as typeof setTimeout;
}

function stubFetch(responses: Array<() => Response>): { calls: number } {
  const state = { calls: 0 };
  globalThis.fetch = (async () => {
    const i = Math.min(state.calls, responses.length - 1);
    state.calls++;
    return responses[i]();
  }) as unknown as typeof fetch;
  return state;
}

const wrappers: Array<[string, () => Promise<{ ok: boolean }>]> = [
  ["apiFetch", () => apiFetch<{ ok: boolean }>("/x")],
  ["apiPost", () => apiPost<{ ok: boolean }>("/x", {})],
];

for (const [name, call] of wrappers) {
  describe(`${name} retry/backoff`, () => {
    test("retries a 429 and succeeds on the next attempt", async () => {
      instantTimers();
      const state = stubFetch([
        () => new Response("", { status: 429 }),
        () => new Response('{"ok":true}', { status: 200 }),
      ]);

      const data = await call();
      expect(data.ok).toBe(true);
      expect(state.calls).toBe(2);
    });

    test("does not retry a plain 4xx", async () => {
      const state = stubFetch([() => new Response("", { status: 400 })]);

      await expect(call()).rejects.toThrow(/400/);
      expect(state.calls).toBe(1);
    });

    test("gives up after the initial attempt plus six retries on persistent 5xx", async () => {
      instantTimers();
      const state = stubFetch([() => new Response("", { status: 500 })]);

      await expect(call()).rejects.toThrow(/500/);
      expect(state.calls).toBe(7);
    });
  });
}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall