agentic-team-templates 0.6.1 → 0.8.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/README.md +85 -39
- package/package.json +1 -1
- package/src/index.js +68 -0
- package/src/index.test.js +62 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# agentic-team-templates
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/agentic-team-templates)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
6
|
**Compatible with:**
|
|
@@ -23,14 +23,14 @@ AI coding assistant templates for Cursor IDE, Claude Code, and GitHub Copilot. P
|
|
|
23
23
|
No installation required. Run directly with `npx`:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npx
|
|
26
|
+
npx agentic-team-templates <template-name>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
Or install globally:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
npm install -g
|
|
33
|
-
|
|
32
|
+
npm install -g agentic-team-templates
|
|
33
|
+
agentic-team-templates <template-name>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
## How to Use
|
|
@@ -40,7 +40,7 @@ cursor-templates <template-name>
|
|
|
40
40
|
Navigate to your project directory and run:
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npx
|
|
43
|
+
npx agentic-team-templates web-frontend
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
This installs the template rules in your project directory.
|
|
@@ -50,13 +50,13 @@ This installs the template rules in your project directory.
|
|
|
50
50
|
Combine templates for projects that span multiple domains:
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
npx
|
|
53
|
+
npx agentic-team-templates web-frontend web-backend
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
### List All Available Templates
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
npx
|
|
59
|
+
npx agentic-team-templates --list
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
### Preview Before Installing (Dry Run)
|
|
@@ -64,7 +64,7 @@ npx cursor-templates --list
|
|
|
64
64
|
See what files will be created without making changes:
|
|
65
65
|
|
|
66
66
|
```bash
|
|
67
|
-
npx
|
|
67
|
+
npx agentic-team-templates web-frontend --dry-run
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
### Update to Latest Rules
|
|
@@ -72,7 +72,7 @@ npx cursor-templates web-frontend --dry-run
|
|
|
72
72
|
Re-run with `@latest` to get updated templates:
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
npx
|
|
75
|
+
npx agentic-team-templates@latest web-frontend
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
### Install for Specific IDE
|
|
@@ -81,16 +81,16 @@ By default, templates install for all supported IDEs (Cursor, Claude, Copilot).
|
|
|
81
81
|
|
|
82
82
|
```bash
|
|
83
83
|
# Install only for Cursor IDE
|
|
84
|
-
npx
|
|
84
|
+
npx agentic-team-templates web-frontend --ide=cursor
|
|
85
85
|
|
|
86
86
|
# Install only for Claude Code
|
|
87
|
-
npx
|
|
87
|
+
npx agentic-team-templates web-frontend --ide=claude
|
|
88
88
|
|
|
89
89
|
# Install only for GitHub Copilot
|
|
90
|
-
npx
|
|
90
|
+
npx agentic-team-templates web-frontend --ide=codex
|
|
91
91
|
|
|
92
92
|
# Install for multiple IDEs
|
|
93
|
-
npx
|
|
93
|
+
npx agentic-team-templates web-frontend --ide=cursor --ide=codex
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
### Remove Specific Templates
|
|
@@ -99,16 +99,16 @@ Remove templates you no longer need while keeping shared rules and other templat
|
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
101
|
# Remove a single template
|
|
102
|
-
npx
|
|
102
|
+
npx agentic-team-templates --remove web-frontend
|
|
103
103
|
|
|
104
104
|
# Remove multiple templates
|
|
105
|
-
npx
|
|
105
|
+
npx agentic-team-templates --remove web-frontend web-backend
|
|
106
106
|
|
|
107
107
|
# Remove from specific IDE only
|
|
108
|
-
npx
|
|
108
|
+
npx agentic-team-templates --remove web-frontend --ide=cursor
|
|
109
109
|
|
|
110
110
|
# Skip confirmation prompt
|
|
111
|
-
npx
|
|
111
|
+
npx agentic-team-templates --remove web-frontend --yes
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
### Reset (Remove Everything)
|
|
@@ -117,16 +117,16 @@ Remove all installed content (shared rules, templates, generated files):
|
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
119
|
# Reset all installed content
|
|
120
|
-
npx
|
|
120
|
+
npx agentic-team-templates --reset
|
|
121
121
|
|
|
122
122
|
# Reset for specific IDE only
|
|
123
|
-
npx
|
|
123
|
+
npx agentic-team-templates --reset --ide=cursor
|
|
124
124
|
|
|
125
125
|
# Skip confirmation prompt
|
|
126
|
-
npx
|
|
126
|
+
npx agentic-team-templates --reset --yes
|
|
127
127
|
|
|
128
128
|
# Force remove modified files
|
|
129
|
-
npx
|
|
129
|
+
npx agentic-team-templates --reset --force
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
### CLI Options
|
|
@@ -186,27 +186,26 @@ Each template adds domain-specific rules. For example, `web-frontend` includes:
|
|
|
186
186
|
|
|
187
187
|
## File Structure
|
|
188
188
|
|
|
189
|
-
After running `npx
|
|
189
|
+
After running `npx agentic-team-templates web-frontend`:
|
|
190
190
|
|
|
191
191
|
```
|
|
192
192
|
your-project/
|
|
193
193
|
├── CLAUDE.md # Development guide (Claude Code, Cursor)
|
|
194
194
|
├── .cursorrules/ # Rule files (Cursor IDE)
|
|
195
|
-
│
|
|
195
|
+
│ ├── core-principles.md # Shared
|
|
196
|
+
│ ├── code-quality.md # Shared
|
|
197
|
+
│ ├── security-fundamentals.md # Shared
|
|
198
|
+
│ ├── git-workflow.md # Shared
|
|
199
|
+
│ ├── communication.md # Shared
|
|
200
|
+
│ ├── web-frontend-overview.md # Template-specific
|
|
201
|
+
│ ├── web-frontend-accessibility.md # Template-specific
|
|
202
|
+
│ ├── web-frontend-component-patterns.md # Template-specific
|
|
203
|
+
│ ├── web-frontend-performance.md # Template-specific
|
|
204
|
+
│ ├── web-frontend-state-management.md # Template-specific
|
|
205
|
+
│ ├── web-frontend-styling.md # Template-specific
|
|
206
|
+
│ └── web-frontend-testing.md # Template-specific
|
|
196
207
|
└── .github/
|
|
197
208
|
└── copilot-instructions.md # Instructions (GitHub Copilot)
|
|
198
|
-
├── core-principles.md # Shared
|
|
199
|
-
├── code-quality.md # Shared
|
|
200
|
-
├── security-fundamentals.md # Shared
|
|
201
|
-
├── git-workflow.md # Shared
|
|
202
|
-
├── communication.md # Shared
|
|
203
|
-
├── web-frontend-overview.md # Template-specific
|
|
204
|
-
├── web-frontend-accessibility.md # Template-specific
|
|
205
|
-
├── web-frontend-component-patterns.md # Template-specific
|
|
206
|
-
├── web-frontend-performance.md # Template-specific
|
|
207
|
-
├── web-frontend-state-management.md # Template-specific
|
|
208
|
-
├── web-frontend-styling.md # Template-specific
|
|
209
|
-
└── web-frontend-testing.md # Template-specific
|
|
210
209
|
```
|
|
211
210
|
|
|
212
211
|
## Customization
|
|
@@ -238,7 +237,7 @@ Templates merge with your existing `.cursorrules/` directory. Existing files are
|
|
|
238
237
|
```bash
|
|
239
238
|
mkdir my-react-app && cd my-react-app
|
|
240
239
|
npm create vite@latest . -- --template react-ts
|
|
241
|
-
npx
|
|
240
|
+
npx agentic-team-templates web-frontend
|
|
242
241
|
```
|
|
243
242
|
|
|
244
243
|
### Full-Stack Next.js Project
|
|
@@ -246,21 +245,21 @@ npx cursor-templates web-frontend
|
|
|
246
245
|
```bash
|
|
247
246
|
npx create-next-app@latest my-app
|
|
248
247
|
cd my-app
|
|
249
|
-
npx
|
|
248
|
+
npx agentic-team-templates fullstack
|
|
250
249
|
```
|
|
251
250
|
|
|
252
251
|
### Microservices Backend
|
|
253
252
|
|
|
254
253
|
```bash
|
|
255
254
|
cd my-api-service
|
|
256
|
-
npx
|
|
255
|
+
npx agentic-team-templates web-backend devops-sre
|
|
257
256
|
```
|
|
258
257
|
|
|
259
258
|
### ML/AI Project
|
|
260
259
|
|
|
261
260
|
```bash
|
|
262
261
|
cd my-ml-project
|
|
263
|
-
npx
|
|
262
|
+
npx agentic-team-templates ml-ai data-engineering
|
|
264
263
|
```
|
|
265
264
|
|
|
266
265
|
## Requirements
|
|
@@ -271,6 +270,53 @@ npx cursor-templates ml-ai data-engineering
|
|
|
271
270
|
- Claude Code (reads `CLAUDE.md` automatically)
|
|
272
271
|
- GitHub Copilot (reads `.github/copilot-instructions.md`)
|
|
273
272
|
|
|
273
|
+
## Troubleshooting
|
|
274
|
+
|
|
275
|
+
### "Unknown option" or Missing Features
|
|
276
|
+
|
|
277
|
+
If you're getting errors for options that should exist (like `--reset`), you may have a cached old version:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Force latest version (recommended)
|
|
281
|
+
npx agentic-team-templates@latest <command>
|
|
282
|
+
|
|
283
|
+
# Clear npx cache
|
|
284
|
+
npx clear-npx-cache
|
|
285
|
+
|
|
286
|
+
# Or manually clear npm cache
|
|
287
|
+
npm cache clean --force
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Verify Your Version
|
|
291
|
+
|
|
292
|
+
Check which version you're running:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
npx agentic-team-templates --version
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Output:
|
|
299
|
+
```
|
|
300
|
+
agentic-team-templates v0.7.0
|
|
301
|
+
Changelog: https://github.com/djm204/agentic-team-templates/releases/tag/agentic-team-templates-v0.7.0
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Or use `--help` which also checks for updates:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
npx agentic-team-templates@latest --help
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
The CLI will notify you if a newer version is available.
|
|
311
|
+
|
|
312
|
+
### Update Global Installation
|
|
313
|
+
|
|
314
|
+
If installed globally:
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
npm update -g agentic-team-templates
|
|
318
|
+
```
|
|
319
|
+
|
|
274
320
|
## How to Contribute
|
|
275
321
|
|
|
276
322
|
We welcome contributions! Here's how to add new templates or improve existing ones.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-team-templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "AI coding assistant templates for Cursor IDE. Pre-configured rules and guidelines that help AI assistants write better code. - use at your own risk",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cursor",
|
package/src/index.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
|
+
import { exec } from 'child_process';
|
|
5
|
+
import { promisify } from 'util';
|
|
6
|
+
|
|
7
|
+
const execAsync = promisify(exec);
|
|
4
8
|
|
|
5
9
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
10
|
const __dirname = path.dirname(__filename);
|
|
7
11
|
const TEMPLATES_DIR = path.join(__dirname, '..', 'templates');
|
|
8
12
|
|
|
13
|
+
// Read package.json for version info
|
|
14
|
+
const packageJsonPath = path.join(__dirname, '..', 'package.json');
|
|
15
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
16
|
+
const PACKAGE_NAME = packageJson.name;
|
|
17
|
+
const CURRENT_VERSION = packageJson.version;
|
|
18
|
+
const REPO_URL = 'https://github.com/djm204/agentic-team-templates';
|
|
19
|
+
const CHANGELOG_URL = `${REPO_URL}/releases/tag/${PACKAGE_NAME}-v${CURRENT_VERSION}`;
|
|
20
|
+
|
|
9
21
|
// Available templates
|
|
10
22
|
const TEMPLATES = {
|
|
11
23
|
'blockchain': {
|
|
@@ -61,8 +73,50 @@ const colors = {
|
|
|
61
73
|
yellow: (s) => `\x1b[33m${s}\x1b[0m`,
|
|
62
74
|
blue: (s) => `\x1b[34m${s}\x1b[0m`,
|
|
63
75
|
dim: (s) => `\x1b[2m${s}\x1b[0m`,
|
|
76
|
+
cyan: (s) => `\x1b[36m${s}\x1b[0m`,
|
|
64
77
|
};
|
|
65
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Compare two semver version strings
|
|
81
|
+
* @returns {number} -1 if a < b, 0 if a === b, 1 if a > b
|
|
82
|
+
*/
|
|
83
|
+
function compareVersions(a, b) {
|
|
84
|
+
const partsA = a.split('.').map(Number);
|
|
85
|
+
const partsB = b.split('.').map(Number);
|
|
86
|
+
|
|
87
|
+
for (let i = 0; i < 3; i++) {
|
|
88
|
+
const numA = partsA[i] || 0;
|
|
89
|
+
const numB = partsB[i] || 0;
|
|
90
|
+
if (numA < numB) return -1;
|
|
91
|
+
if (numA > numB) return 1;
|
|
92
|
+
}
|
|
93
|
+
return 0;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Check npm for the latest version and notify if update available
|
|
98
|
+
* Fails silently on network errors
|
|
99
|
+
*/
|
|
100
|
+
async function checkForUpdates() {
|
|
101
|
+
try {
|
|
102
|
+
const { stdout } = await execAsync(`npm view ${PACKAGE_NAME} version`, {
|
|
103
|
+
timeout: 5000, // 5 second timeout
|
|
104
|
+
});
|
|
105
|
+
const latestVersion = stdout.trim();
|
|
106
|
+
|
|
107
|
+
if (compareVersions(CURRENT_VERSION, latestVersion) < 0) {
|
|
108
|
+
console.log(colors.cyan(`
|
|
109
|
+
┌────────────────────────────────────────────────────────────┐
|
|
110
|
+
│ Update available: ${CURRENT_VERSION} → ${latestVersion} │
|
|
111
|
+
│ Run: npx ${PACKAGE_NAME}@latest │
|
|
112
|
+
└────────────────────────────────────────────────────────────┘
|
|
113
|
+
`));
|
|
114
|
+
}
|
|
115
|
+
} catch {
|
|
116
|
+
// Silently ignore network errors or timeouts
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
66
120
|
function printBanner() {
|
|
67
121
|
console.log(colors.blue(`
|
|
68
122
|
╔═══════════════════════════════════════════════════════════╗
|
|
@@ -83,6 +137,7 @@ ${colors.yellow('Options:')}
|
|
|
83
137
|
Default: all (cursor, claude, codex)
|
|
84
138
|
--list, -l List available templates
|
|
85
139
|
--help, -h Show this help message
|
|
140
|
+
--version, -v Show version number
|
|
86
141
|
--dry-run Show what would be changed
|
|
87
142
|
--force, -f Overwrite/remove even if files were modified
|
|
88
143
|
--yes, -y Skip confirmation prompt (for --remove and --reset)
|
|
@@ -1225,6 +1280,10 @@ export async function run(args) {
|
|
|
1225
1280
|
printBanner();
|
|
1226
1281
|
printHelp();
|
|
1227
1282
|
process.exit(0);
|
|
1283
|
+
} else if (arg === '--version' || arg === '-v') {
|
|
1284
|
+
console.log(`${PACKAGE_NAME} v${CURRENT_VERSION}`);
|
|
1285
|
+
console.log(`${colors.dim('Changelog:')} ${CHANGELOG_URL}`);
|
|
1286
|
+
process.exit(0);
|
|
1228
1287
|
} else if (arg === '--dry-run') {
|
|
1229
1288
|
dryRun = true;
|
|
1230
1289
|
} else if (arg === '--force' || arg === '-f') {
|
|
@@ -1255,6 +1314,9 @@ export async function run(args) {
|
|
|
1255
1314
|
}
|
|
1256
1315
|
|
|
1257
1316
|
printBanner();
|
|
1317
|
+
|
|
1318
|
+
// Check for updates (non-blocking, fails silently)
|
|
1319
|
+
await checkForUpdates();
|
|
1258
1320
|
|
|
1259
1321
|
// Use default IDEs if none specified
|
|
1260
1322
|
const targetIdes = ides.length > 0 ? ides : DEFAULT_IDES;
|
|
@@ -1339,10 +1401,16 @@ export async function run(args) {
|
|
|
1339
1401
|
|
|
1340
1402
|
// Export internals for testing
|
|
1341
1403
|
export const _internals = {
|
|
1404
|
+
PACKAGE_NAME,
|
|
1405
|
+
CURRENT_VERSION,
|
|
1406
|
+
REPO_URL,
|
|
1407
|
+
CHANGELOG_URL,
|
|
1342
1408
|
TEMPLATES,
|
|
1343
1409
|
SHARED_RULES,
|
|
1344
1410
|
SUPPORTED_IDES,
|
|
1345
1411
|
DEFAULT_IDES,
|
|
1412
|
+
compareVersions,
|
|
1413
|
+
checkForUpdates,
|
|
1346
1414
|
filesMatch,
|
|
1347
1415
|
parseMarkdownSections,
|
|
1348
1416
|
generateSectionSignature,
|
package/src/index.test.js
CHANGED
|
@@ -5,10 +5,13 @@ import os from 'os';
|
|
|
5
5
|
import { run, _internals } from './index.js';
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
|
+
PACKAGE_NAME,
|
|
9
|
+
CURRENT_VERSION,
|
|
8
10
|
TEMPLATES,
|
|
9
11
|
SHARED_RULES,
|
|
10
12
|
SUPPORTED_IDES,
|
|
11
13
|
DEFAULT_IDES,
|
|
14
|
+
compareVersions,
|
|
12
15
|
filesMatch,
|
|
13
16
|
parseMarkdownSections,
|
|
14
17
|
generateSectionSignature,
|
|
@@ -28,6 +31,44 @@ const {
|
|
|
28
31
|
// Constants & Configuration Tests
|
|
29
32
|
// ============================================================================
|
|
30
33
|
|
|
34
|
+
describe('Package Info', () => {
|
|
35
|
+
it('should have a valid package name', () => {
|
|
36
|
+
expect(PACKAGE_NAME).toBe('agentic-team-templates');
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should have a valid semver version', () => {
|
|
40
|
+
expect(CURRENT_VERSION).toMatch(/^\d+\.\d+\.\d+/);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
describe('Version Comparison', () => {
|
|
45
|
+
describe('compareVersions', () => {
|
|
46
|
+
it('should return 0 for equal versions', () => {
|
|
47
|
+
expect(compareVersions('1.0.0', '1.0.0')).toBe(0);
|
|
48
|
+
expect(compareVersions('2.5.3', '2.5.3')).toBe(0);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it('should return -1 when first version is lower', () => {
|
|
52
|
+
expect(compareVersions('1.0.0', '1.0.1')).toBe(-1);
|
|
53
|
+
expect(compareVersions('1.0.0', '1.1.0')).toBe(-1);
|
|
54
|
+
expect(compareVersions('1.0.0', '2.0.0')).toBe(-1);
|
|
55
|
+
expect(compareVersions('0.6.1', '0.7.0')).toBe(-1);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('should return 1 when first version is higher', () => {
|
|
59
|
+
expect(compareVersions('1.0.1', '1.0.0')).toBe(1);
|
|
60
|
+
expect(compareVersions('1.1.0', '1.0.0')).toBe(1);
|
|
61
|
+
expect(compareVersions('2.0.0', '1.0.0')).toBe(1);
|
|
62
|
+
expect(compareVersions('0.7.0', '0.6.1')).toBe(1);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
it('should handle missing patch versions', () => {
|
|
66
|
+
expect(compareVersions('1.0', '1.0.0')).toBe(0);
|
|
67
|
+
expect(compareVersions('1.0.0', '1.0')).toBe(0);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
31
72
|
describe('Constants', () => {
|
|
32
73
|
describe('TEMPLATES', () => {
|
|
33
74
|
it('should have all expected templates', () => {
|
|
@@ -842,6 +883,27 @@ describe('CLI Argument Parsing', () => {
|
|
|
842
883
|
expect(exitSpy).toHaveBeenCalledWith(0);
|
|
843
884
|
});
|
|
844
885
|
|
|
886
|
+
it('should show version with --version', async () => {
|
|
887
|
+
await expect(run(['--version'])).rejects.toThrow('process.exit');
|
|
888
|
+
|
|
889
|
+
expect(exitSpy).toHaveBeenCalledWith(0);
|
|
890
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(expect.stringContaining('agentic-team-templates'));
|
|
891
|
+
});
|
|
892
|
+
|
|
893
|
+
it('should show version with -v', async () => {
|
|
894
|
+
await expect(run(['-v'])).rejects.toThrow('process.exit');
|
|
895
|
+
|
|
896
|
+
expect(exitSpy).toHaveBeenCalledWith(0);
|
|
897
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(expect.stringContaining('agentic-team-templates'));
|
|
898
|
+
});
|
|
899
|
+
|
|
900
|
+
it('should show changelog link with --version', async () => {
|
|
901
|
+
await expect(run(['--version'])).rejects.toThrow('process.exit');
|
|
902
|
+
|
|
903
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(expect.stringContaining('github.com'));
|
|
904
|
+
expect(consoleLogSpy).toHaveBeenCalledWith(expect.stringContaining('releases/tag'));
|
|
905
|
+
});
|
|
906
|
+
|
|
845
907
|
it('should error on unknown option', async () => {
|
|
846
908
|
await expect(run(['--unknown-option'])).rejects.toThrow('process.exit');
|
|
847
909
|
|