const assert = require("node:assert");
const { test } = require("node:test");

const { shouldStartCelery } = require("./desktop-prod.js");

test("desktop-prod 默认跳过 Celery，只有显式开启时才启动", () => {
  assert.equal(shouldStartCelery({}), false);
  assert.equal(shouldStartCelery({ ENABLE_CELERY: "1" }), true);
  assert.equal(shouldStartCelery({ ENABLE_CELERY: "true" }), true);
  assert.equal(shouldStartCelery({ CELERY_CMD: "custom-celery" }), true);
  assert.equal(shouldStartCelery({ ENABLE_CELERY: "1", SKIP_CELERY: "1" }), false);
});
