import { describe, it } from 'node:test' import assert from 'node:assert/strict' import { hasOaCommentDraft } from './oa-comment-draft.ts' describe('hasOaCommentDraft', () => { it('treats blank content without mentions/files as empty', () => { assert.equal(hasOaCommentDraft({}), false) assert.equal(hasOaCommentDraft({ content: ' ', mentionCount: 0, attachmentCount: 0 }), false) }) it('detects text, mentions and attachments', () => { assert.equal(hasOaCommentDraft({ content: '@test' }), true) assert.equal(hasOaCommentDraft({ mentionCount: 1 }), true) assert.equal(hasOaCommentDraft({ attachmentCount: 2 }), true) }) })