Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

1006 B
Raw Blame
import { createRequire } from 'node:module';

import { describe, expect, it } from 'vitest';

const require = createRequire(import.meta.url);
const { shouldBuildDesktopCanary } = require('./desktopCanaryTrigger.cjs') as {
  shouldBuildDesktopCanary: (subject: string) => boolean;
};

describe('shouldBuildDesktopCanary', () => {
  it.each([
    'feat: add a feature',
    'fix(scope): repair a bug',
    'πŸ”₯ refactor(agentTasks): remove stale labels',
    'πŸ’„ feat(chat): resolve entity links',
    'πŸ› perf(upload): hash files off the main thread',
  ])('accepts release commit type independently of gitmoji: %s', (subject) => {
    expect(shouldBuildDesktopCanary(subject)).toBe(true);
  });

  it.each([
    'chore: update dependencies',
    'πŸ”₯ chore: remove generated files',
    'docs(scope): update release docs',
    'chore: mention feat: in the release notes',
  ])('rejects non-release commit type: %s', (subject) => {
    expect(shouldBuildDesktopCanary(subject)).toBe(false);
  });
});