reconsumeralization / CodeCurse

CodeCurse AI IDE
MIT License
2 stars 0 forks source link

Add Unit Tests for Workstation and Repository Files #16

Closed sweep-ai[bot] closed 1 year ago

sweep-ai[bot] commented 1 year ago

PR Feedback (click)

In addition, test files have been created for the following files:

Summary of Changes

Please review and merge this PR to ensure comprehensive test coverage for the workstation and repository files.

Fixes #14.


πŸŽ‰ Latest improvements to Sweep:


πŸ’‘ To get Sweep to edit this pull request, you can:

sweep-ai[bot] commented 1 year ago

Sandbox Executions

trunk fmt workbench/features/chat/chatSelectors.test.ts || exit 0 1/2 βœ“
 βœ” Formatted workbench/features/chat/chatSelectors.test.ts
Re-checking autofixed files...

Checked 1 file
βœ” No issues
trunk check --fix --print-failures workbench/features/chat/chatSelectors.test.ts 2/2 βœ“
Checked 1 file
βœ” No issues

trunk fmt workbench/features/codemirror/codemirrorSelectors.test.ts || exit 0 1/2 βœ“
 βœ” Formatted workbench/features/codemirror/codemirrorSelectors.test.ts
Re-checking autofixed files...

Checked 1 file
βœ” No issues
trunk check --fix --print-failures workbench/features/codemirror/codemirrorSelectors.test.ts 2/2 βœ“
Checked 1 file
βœ” No issues

trunk fmt workbench/features/comment/commentSelectors.test.ts || exit 0 1/2 βœ“
 βœ” Formatted workbench/features/comment/commentSelectors.test.ts
Re-checking autofixed files...

Checked 1 file
βœ” No issues
trunk check --fix --print-failures workbench/features/comment/commentSelectors.test.ts 2/2 βœ“
Checked 1 file
βœ” No issues

trunk fmt workbench/features/extensions/extension.test.ts || exit 0 1/2 βœ“
  FAILURES  
 prettier  workbench/features/extensions/extension.test.ts  .trunk/out/YpAWV.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 0 files
βœ– No issues, 1 failure
trunk check --fix --print-failures workbench/features/extensions/extension.test.ts 2/2 ❌ (`1`)
  FAILURES  
 prettier  workbench/features/extensions/extension.test.ts  .trunk/out/wQIYH.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 1 file
βœ– No issues, 1 failure
# .trunk/out/wQIYH.yaml
trunk_cli_version: 1.17.1
title: prettier exited with exit_code=2
report:
  - prettier exited with exit_code=2
  - linter:
      command: |
        /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/extensions/extension.test.ts
      stdin_path: (none)
      run_from: /tmp/trunk-0/wYZV7a/Mu1Y7F
      timeout: 10m
      rerun: (cd /tmp/trunk-0/wYZV7a/Mu1Y7F; env -i PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3/bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/root NODE_PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/extensions/extension.test.ts)
      affects_cache:
        []
      direct_configs:
        []
      exit_status: exited
      exit_code: 2
      stdout: (none)
      stderr: |
        [error] workbench/features/extensions/extension.test.ts: SyntaxError: Expression expected. (5:39)
        [error]   3 | describe('function1', () => {
        [error]   4 |   test('should return correct output for case 1', () => {
        [error] > 5 |     const input = /* some test data */;
        [error]     |                                       ^
        [error]   6 |     const output = function1(input);
        [error]   7 |     expect(output).toEqual(/* expected output */);
        [error]   8 |   });
    parser: |
      (none)

trunk fmt workbench/features/extensions/extension.test.ts || exit 0 1/2 βœ“
  FAILURES  
 prettier  workbench/features/extensions/extension.test.ts  .trunk/out/ksvP4.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 0 files
βœ– No issues, 1 failure
trunk check --fix --print-failures workbench/features/extensions/extension.test.ts 2/2 ❌ (`1`)
  FAILURES  
 prettier  workbench/features/extensions/extension.test.ts  .trunk/out/6rISr.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 1 file
βœ– No issues, 1 failure
# .trunk/out/6rISr.yaml
trunk_cli_version: 1.17.1
title: prettier exited with exit_code=2
report:
  - prettier exited with exit_code=2
  - linter:
      command: |
        /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/extensions/extension.test.ts
      stdin_path: (none)
      run_from: /tmp/trunk-0/e7QZ5s/bODj3o
      timeout: 10m
      rerun: (cd /tmp/trunk-0/e7QZ5s/bODj3o; env -i PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3/bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/root NODE_PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/extensions/extension.test.ts)
      affects_cache:
        []
      direct_configs:
        []
      exit_status: exited
      exit_code: 2
      stdout: (none)
      stderr: |
        [error] workbench/features/extensions/extension.test.ts: SyntaxError: Expression expected. (5:39)
        [error]   3 | describe('function1', () => {
        [error]   4 |   test('should return correct output for case 1', () => {
        [error] > 5 |     const input = /* some test data */;
        [error]     |                                       ^
        [error]   6 |     const output = function1(input);
        [error]   7 |     expect(output).toEqual(/* expected output */);
        [error]   8 |   });
    parser: |
      (none)

trunk fmt workbench/features/extensions/extension.test.ts || exit 0 1/2 βœ“
  FAILURES  
 prettier  workbench/features/extensions/extension.test.ts  .trunk/out/YpAWV.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 0 files
βœ– No issues, 1 failure
trunk check --fix --print-failures workbench/features/extensions/extension.test.ts 2/2 ❌ (`1`)
  FAILURES  
 prettier  workbench/features/extensions/extension.test.ts  .trunk/out/wQIYH.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 1 file
βœ– No issues, 1 failure
# .trunk/out/wQIYH.yaml
trunk_cli_version: 1.17.1
title: prettier exited with exit_code=2
report:
  - prettier exited with exit_code=2
  - linter:
      command: |
        /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/extensions/extension.test.ts
      stdin_path: (none)
      run_from: /tmp/trunk-0/wYZV7a/Mu1Y7F
      timeout: 10m
      rerun: (cd /tmp/trunk-0/wYZV7a/Mu1Y7F; env -i PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3/bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/root NODE_PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/extensions/extension.test.ts)
      affects_cache:
        []
      direct_configs:
        []
      exit_status: exited
      exit_code: 2
      stdout: (none)
      stderr: |
        [error] workbench/features/extensions/extension.test.ts: SyntaxError: Expression expected. (5:39)
        [error]   3 | describe('function1', () => {
        [error]   4 |   test('should return correct output for case 1', () => {
        [error] > 5 |     const input = /* some test data */;
        [error]     |                                       ^
        [error]   6 |     const output = function1(input);
        [error]   7 |     expect(output).toEqual(/* expected output */);
        [error]   8 |   });
    parser: |
      (none)

trunk fmt workbench/features/linter/lint.test.ts || exit 0 1/2 βœ“
  FAILURES  
 prettier  workbench/features/linter/lint.test.ts  .trunk/out/WaBKV.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 0 files
βœ– No issues, 1 failure
trunk check --fix --print-failures workbench/features/linter/lint.test.ts 2/2 ❌ (`1`)
  FAILURES  
 prettier  workbench/features/linter/lint.test.ts  .trunk/out/vzWQu.yaml
  NOTICES  
 A tool failed to run. You can open the details yaml file for more information.
Checked 1 file
βœ– No issues, 1 failure
# .trunk/out/vzWQu.yaml
trunk_cli_version: 1.17.1
title: prettier exited with exit_code=2
report:
  - prettier exited with exit_code=2
  - linter:
      command: |
        /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/linter/lint.test.ts
      stdin_path: (none)
      run_from: /tmp/trunk-0/Zb5blV/0ek7Yt
      timeout: 10m
      rerun: (cd /tmp/trunk-0/Zb5blV/0ek7Yt; env -i PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3/bin:/root/.cache/trunk/tools/node/18.12.1-00ae74f39ac4de3ff3c7e3686016ebf3:/root/.nvm/versions/node/v18.17.0/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOME=/root NODE_PATH=/root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules /root/.cache/trunk/tools/prettier/3.0.3-f40a31f1cf22ae011727ab1e40e55171/node_modules/.bin/prettier -w workbench/features/linter/lint.test.ts)
      affects_cache:
        []
      direct_configs:
        []
      exit_status: exited
      exit_code: 2
      stdout: (none)
      stderr: |
        [error] workbench/features/linter/lint.test.ts: SyntaxError: Expression expected. (8:39)
        [error]    6 | describe('function1', () => {
        [error]    7 |   test('should return correct output for case 1', () => {
        [error] >  8 |     const input = /* some test data */;
        [error]      |                                       ^
        [error]    9 |     const output = function1(input);
        [error]   10 |     expect(output).toEqual(/* expected output */);
        [error]   11 |   });
    parser: |
      (none)

trunk fmt workbench/features/logging/loggingSelectors.test.ts || exit 0 1/2 βœ“
 βœ” Formatted workbench/features/logging/loggingSelectors.test.ts
Re-checking autofixed files...

Checked 1 file
βœ” No issues
trunk check --fix --print-failures workbench/features/logging/loggingSelectors.test.ts 2/2 βœ“
Checked 1 file
βœ” No issues

trunk fmt workbench/features/lsp/languageServerSelector.test.ts || exit 0 1/2 βœ“
 βœ” Formatted workbench/features/lsp/languageServerSelector.test.ts
Re-checking autofixed files...

Checked 1 file
βœ” No issues
trunk check --fix --print-failures workbench/features/lsp/languageServerSelector.test.ts 2/2 βœ“
Checked 1 file
βœ” No issues

trunk fmt workbench/features/window/fileUtils.test.ts || exit 0 1/2 βœ“
 βœ” Formatted workbench/features/window/fileUtils.test.ts
Re-checking autofixed files...

Checked 1 file
βœ” No issues
trunk check --fix --print-failures workbench/features/window/fileUtils.test.ts 2/2 βœ“
Checked 1 file
βœ” No issues

sweep-ai[bot] commented 1 year ago

Apply Sweep Rules to your PR?

height[bot] commented 1 year ago

Link Height tasks by mentioning a task ID in the pull request title or commit messages, or description and comments with the keyword link (e.g. "Link T-123").

πŸ’‘Tip: You can also use "Close T-X" to automatically close a task when the pull request is merged.