@chief-clancy/brief 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Structural tests for brief workflow files.
3
+ *
4
+ * Verifies the workflows directory contains the expected markdown files
5
+ * that the brief installer depends on.
6
+ */
7
+ import { readdirSync, readFileSync } from 'node:fs';
8
+ import { fileURLToPath } from 'node:url';
9
+
10
+ import { describe, expect, it } from 'vitest';
11
+
12
+ const WORKFLOWS_DIR = fileURLToPath(new URL('.', import.meta.url));
13
+
14
+ const EXPECTED_WORKFLOWS = ['brief.md'];
15
+
16
+ describe('workflows directory structure', () => {
17
+ it('contains exactly the expected workflow files', () => {
18
+ const workflows = readdirSync(WORKFLOWS_DIR)
19
+ .filter((f) => f.endsWith('.md'))
20
+ .sort();
21
+
22
+ expect(workflows).toEqual([...EXPECTED_WORKFLOWS].sort());
23
+ });
24
+
25
+ it('all workflow files start with a heading', () => {
26
+ const issues: string[] = [];
27
+
28
+ EXPECTED_WORKFLOWS.forEach((file) => {
29
+ const content = readFileSync(new URL(file, import.meta.url), 'utf8');
30
+ const firstLine = content.split('\n')[0]?.trim() ?? '';
31
+
32
+ if (!firstLine.startsWith('#')) {
33
+ issues.push(file);
34
+ }
35
+ });
36
+
37
+ expect(issues).toEqual([]);
38
+ });
39
+
40
+ it('brief workflow references the workflow reference marker', () => {
41
+ const content = readFileSync(new URL('brief.md', import.meta.url), 'utf8');
42
+
43
+ expect(content).toContain('## Step 1');
44
+ expect(content).toContain('.clancy/briefs/');
45
+ });
46
+ });