create-lore 0.1.6 → 0.3.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.
- package/package.json +1 -1
- package/test/create-lore.test.js +25 -0
package/package.json
CHANGED
package/test/create-lore.test.js
CHANGED
|
@@ -77,6 +77,31 @@ describe('create-lore', () => {
|
|
|
77
77
|
cleanup();
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
+
it('has OpenCode plugins when template provides them', () => {
|
|
81
|
+
if (!fs.existsSync(path.join(TEMPLATE, '.opencode/plugins'))) return;
|
|
82
|
+
|
|
83
|
+
run(OUTPUT);
|
|
84
|
+
assert.ok(fs.existsSync(path.join(OUTPUT, '.opencode', 'plugins', 'session-init.js')),
|
|
85
|
+
'session-init.js copied');
|
|
86
|
+
assert.ok(fs.existsSync(path.join(OUTPUT, '.opencode', 'plugins', 'knowledge-tracker.js')),
|
|
87
|
+
'knowledge-tracker.js copied');
|
|
88
|
+
assert.ok(fs.existsSync(path.join(OUTPUT, '.opencode', 'plugins', 'protect-memory.js')),
|
|
89
|
+
'protect-memory.js copied');
|
|
90
|
+
assert.ok(fs.existsSync(path.join(OUTPUT, '.opencode', 'package.json')),
|
|
91
|
+
'.opencode/package.json copied');
|
|
92
|
+
cleanup();
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it('has opencode.json when template provides it', () => {
|
|
96
|
+
if (!fs.existsSync(path.join(TEMPLATE, 'opencode.json'))) return;
|
|
97
|
+
|
|
98
|
+
run(OUTPUT);
|
|
99
|
+
const parsed = JSON.parse(fs.readFileSync(path.join(OUTPUT, 'opencode.json'), 'utf8'));
|
|
100
|
+
assert.ok(parsed.instructions, 'instructions key exists');
|
|
101
|
+
assert.ok(parsed.instructions.includes('CLAUDE.md'), 'instructions includes CLAUDE.md');
|
|
102
|
+
cleanup();
|
|
103
|
+
});
|
|
104
|
+
|
|
80
105
|
it('passes validate-consistency.sh when template provides it', () => {
|
|
81
106
|
if (!fs.existsSync(path.join(TEMPLATE, 'scripts/validate-consistency.sh'))) return;
|
|
82
107
|
|