feat(output): Add git metrics to output #569
Annotations
8 errors
|
Run npm run test --reporter=verbose:
tests/config/configSchema.test.ts#L88
AssertionError: expected { Object (output, include, ...) } to deeply equal { Object (output, include, ...) }
- Expected
+ Received
{
"ignore": {
"customPatterns": [],
"useDefaultPatterns": true,
"useGitignore": true,
},
"include": [],
"output": {
"copyToClipboard": true,
"directoryStructure": true,
"filePath": "output.txt",
"fileSummary": true,
+ "gitMetrics": {
+ "enabled": false,
+ "maxCommits": 100,
+ },
"parsableStyle": false,
"removeComments": false,
"removeEmptyLines": false,
"showLineNumbers": false,
"style": "plain",
"topFilesLength": 5,
},
"security": {
"enableSecurityCheck": true,
},
"tokenCount": {
"encoding": "o200k_base",
},
}
❯ tests/config/configSchema.test.ts:88:61
|
Run npm run test --reporter=verbose:
tests/config/configSchema.test.ts#L172
AssertionError: expected { output: { …(11) }, …(5) } to deeply equal { cwd: '/path/to/project', …(5) }
- Expected
+ Received
{
"cwd": "/path/to/project",
"ignore": {
"customPatterns": [
"*.log",
],
"useDefaultPatterns": true,
"useGitignore": true,
},
"include": [
"**/*.js",
"**/*.ts",
],
"output": {
"copyToClipboard": false,
"directoryStructure": true,
"filePath": "merged-output.txt",
"fileSummary": true,
+ "gitMetrics": {
+ "enabled": false,
+ "maxCommits": 100,
+ },
"parsableStyle": false,
"removeComments": true,
"removeEmptyLines": false,
"showLineNumbers": true,
"style": "plain",
"topFilesLength": 10,
},
"security": {
"enableSecurityCheck": true,
},
"tokenCount": {
"encoding": "o200k_base",
},
}
❯ tests/config/configSchema.test.ts:172:60
|
Run npm run test --reporter=verbose:
tests/core/packager.test.ts#L84
AssertionError: expected "spy" to be called with arguments: [ 'root', { …(6) }, …(2) ]
Received:
1st spy call:
[
"root",
{
"cwd": "/Users/runner/work/repomix/repomix",
"ignore": {
"customPatterns": [],
"useDefaultPatterns": true,
"useGitignore": true,
},
"include": [],
"output": {
"copyToClipboard": false,
"directoryStructure": true,
"filePath": "repomix-output.txt",
"fileSummary": true,
"gitMetrics": {
"enabled": false,
"maxCommits": 100,
},
"parsableStyle": false,
"removeComments": false,
"removeEmptyLines": false,
"showLineNumbers": false,
"style": "plain",
"topFilesLength": 5,
},
"security": {
"enableSecurityCheck": true,
},
"tokenCount": {
"encoding": "o200k_base",
},
},
[
{
"content": "processed content 1",
"path": "file1.txt",
},
{
"content": "processed content 2",
"path": "dir1/file2.txt",
},
],
[
"file1.txt",
"dir1/file2.txt",
],
+ undefined,
]
Number of calls: 1
❯ tests/core/packager.test.ts:84:37
|
Run npm run test --reporter=verbose:
tests/core/file/gitMetrics.test.ts#L42
AssertionError: expected "spy" to be called with arguments: [ 'git', …(1) ]
Received:
1st spy call:
[
"git",
[
"-C",
"/test/dir",
"log",
"--name-only",
"--pretty=format:",
- "-n",
- "100",
+ "-n 100",
],
]
2nd spy call:
[
"git",
[
"-C",
"/test/dir",
- "log",
- "--name-only",
- "--pretty=format:",
- "-n",
- "100",
+ "rev-list",
+ "--count",
+ "HEAD",
+ "-n 100",
],
]
Number of calls: 2
❯ tests/core/file/gitMetrics.test.ts:42:33
|
Run npm run test --reporter=verbose:
tests/core/file/gitMetrics.test.ts#L111
AssertionError: expected "spy" to be called with arguments: [ 'git', ArrayContaining ["-n", "3"] ]
Received:
1st spy call:
[
"git",
- ArrayContaining [
- "-n",
- "3",
+ [
+ "-C",
+ "/test/dir",
+ "log",
+ "--name-only",
+ "--pretty=format:",
+ "-n 3",
],
]
2nd spy call:
[
"git",
- ArrayContaining [
- "-n",
- "3",
+ [
+ "-C",
+ "/test/dir",
+ "rev-list",
+ "--count",
+ "HEAD",
+ "-n 3",
],
]
Number of calls: 2
❯ tests/core/file/gitMetrics.test.ts:111:33
|
Run npm run test --reporter=verbose:
tests/core/file/gitMetrics.test.ts#L177
AssertionError: expected { totalCommits: NaN, …(1) } to deeply equal { totalCommits: +0, …(2) }
- Expected
+ Received
{
- "error": "Failed to calculate git metrics",
"mostChangedFiles": [
{
"changes": 1,
"path": "malformed",
},
{
"changes": 1,
"path": "output",
},
],
- "totalCommits": 0,
+ "totalCommits": NaN,
}
❯ tests/core/file/gitMetrics.test.ts:177:22
|
Run npm run test --reporter=verbose
The operation was canceled.
|
Loading