Skip to content

Conversation

@Basit-qc
Copy link
Contributor

No description provided.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link

github-actions bot commented Apr 19, 2024

Coverage report

❌ An unexpected error occurred. For more details, check console

Error: The process '/usr/local/bin/yarn' failed with exit code 1
St.
Category Percentage Covered / Total
🟢 Statements
80.07% (-3.74% 🔻)
2386/2980
🟡 Branches
66.64% (-4.06% 🔻)
785/1178
🟡 Functions
79.35% (-3.57% 🔻)
319/402
🟢 Lines
82.45% (-3.63% 🔻)
2264/2746
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢 src/constants.ts
86.75% (-7.23% 🔻)
100%
60% (-30% 🔻)
86.75% (-7.23% 🔻)
🟢
... / user_utils.ts
82.26% (-6.45% 🔻)
59.09% (-9.09% 🔻)
76.92% (-7.69% 🔻)
85.96% (-5.26% 🔻)
🟢 src/logger.ts 93.94%
80% (-2.86% 🔻)
88.89% 93.65%
🟢
... / api_utils.ts
94.12% (+0.78% 🔼)
87.5% (+4.17% 🔼)
91.67% (-2.08% 🔻)
94.12% (+0.78% 🔼)
🟢
... / repo_state_utils.ts
97.65% (-1.18% 🔻)
81.58% (-2.63% 🔻)
100% 100%
🟢
... / pricing_utils.ts
91.94% (-0.82% 🔻)
79.31% (-1.33% 🔻)
85.71% (-1.79% 🔻)
96.49% (-0.38% 🔻)
🟡
... / auth_utils.ts
67.62% (-15.24% 🔻)
46.34% (-12.2% 🔻)
70.59% (-5.88% 🔻)
69.79% (-15.63% 🔻)
🔴
... / server.ts
33.33% (-0.88% 🔻)
0% 16.67% 36.11%
🟢
... / s3_utils.ts
85.71% (-7.14% 🔻)
100%
75% (-12.5% 🔻)
85.71% (-7.14% 🔻)
🔴
... / setup_utils.ts
50.25% (-30.97% 🔻)
31.4% (-34.08% 🔻)
61.54% (-16.72% 🔻)
53.55% (-30.5% 🔻)
🔴
... / notifications.ts
44.83% (-9.41% 🔻)
23.33% (-6.97% 🔻)
30.77% (-23.08% 🔻)
46.43% (-9.71% 🔻)
🔴 src/extension.ts
17.5% (-32.5% 🔻)
0% (-83.33% 🔻)
16.67%
17.95% (-30.77% 🔻)

Test suite run failed

Failed tests: 10/272. Failed suites: 2/27.
  ● Extension: activate › activate: Fresh Setup, no user, no repo opened

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 0

      86 |         await activate(vscode.ExtensionContext);
      87 |         // Output of setupCodeSync 
    > 88 |         expect(vscode.window.showInformationMessage).toHaveBeenCalledTimes(1);
         |                                                      ^
      89 |         expect(vscode.window.showInformationMessage.mock.calls[0][0]).toBe(NOTIFICATION.WELCOME_MSG);
      90 |         expect(vscode.window.showInformationMessage.mock.calls[0][1]).toBe(NOTIFICATION.LOGIN);
      91 |         expect(vscode.window.showInformationMessage.mock.calls[0][2]).toBe(NOTIFICATION.IGNORE);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:88:54)

  ● Extension: activate › setupCodeSync: Fresh Setup, no user, no repo opened

    Error: ENOENT: no such file or directory, open '/home/runner/work/codesync-vs/codesync-vs/src/node_modules/sql.js/dist/sql-wasm.wasm'

      at Object.Module.onAbort (node_modules/sql.js/dist/sql-wasm.js:40:20)
      at C (node_modules/sql.js/dist/sql-wasm.js:98:26)
      at node_modules/sql.js/dist/sql-wasm.js:99:473

  ● Extension: activate › Fresh Setup, no active user, repo not connected

    RuntimeError: Aborted(Error: ENOENT: no such file or directory, open '/home/runner/work/codesync-vs/codesync-vs/src/node_modules/sql.js/dist/sql-wasm.wasm'). Build with -sASSERTIONS for more info.

      at C (node_modules/sql.js/dist/sql-wasm.js:98:66)
      at node_modules/sql.js/dist/sql-wasm.js:99:473

  ● Extension: activate › Fresh Setup, no active user, repo not connected

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 7
    Received number of calls: 0

      241 |         await activate(vscode.ExtensionContext);
      242 |         await waitFor(1);
    > 243 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);
          |                                                ^
      244 |         // showLogin should be true
      245 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      246 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:243:48)

  ● Extension: activate › With active user, repo not connected

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 0

      271 |         await activate(vscode.ExtensionContext);
      272 |         // Should show Welcome msg
    > 273 |         expect(vscode.window.showInformationMessage).toHaveBeenCalledTimes(1);
          |                                                      ^
      274 |         expect(vscode.window.showInformationMessage.mock.calls[0][0]).toBe(NOTIFICATION.CONNECT_REPO);
      275 |         expect(vscode.window.showInformationMessage.mock.calls[0][1]).toBe(NOTIFICATION.CONNECT);
      276 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:273:54)

  ● Extension: activate › With active user, repo is connected

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 7
    Received number of calls: 0

      299 |         addUser(baseRepoPath);
      300 |         await activate(vscode.ExtensionContext);
    > 301 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);
          |                                                ^
      302 |         // showLogin should be true
      303 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      304 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:301:48)

  ● Extension: activate › With active user, repo is disconnected

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 7
    Received number of calls: 0

      330 |         fs.writeFileSync(configPath, yaml.dump(_configData));
      331 |         await activate(vscode.ExtensionContext);
    > 332 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);
          |                                                ^
      333 |         // showLogin should be true
      334 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      335 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:332:48)

  ● Extension: activate › With deactivated user, repo is connected

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 10
    Received number of calls: 0

      372 |         addUser(baseRepoPath);
      373 |         await activate(vscode.ExtensionContext);
    > 374 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(10);
          |                                                ^
      375 |         // First 3 will be for Deactivated account
      376 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      377 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:374:48)

  ● Extension: activate › With deactivated user, repo is disconnected

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 7
    Received number of calls: 0

      418 |         fs.writeFileSync(configPath, yaml.dump(_configData));
      419 |         await activate(vscode.ExtensionContext);
    > 420 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);
          |                                                ^
      421 |         // showLogin should be true
      422 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      423 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:420:48)

  ● Extension: activate › With user, current repo is a sub directory of a connected repo

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 7
    Received number of calls: 0

      468 |         setWorkspaceFolders(subDir);
      469 |         await activate(vscode.ExtensionContext);
    > 470 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);
          |                                                ^
      471 |         // showLogin should be false
      472 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      473 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:470:48)

  ● Extension: activate › With active user, repo is sub directory and syncignored

    expect(jest.fn()).toHaveBeenCalledTimes(expected)

    Expected number of calls: 7
    Received number of calls: 0

      512 |         setWorkspaceFolders(subDir);
      513 |         await activate(vscode.ExtensionContext);
    > 514 |         expect(vscode.commands.executeCommand).toHaveBeenCalledTimes(7);
          |                                                ^
      515 |         // showLogin should be true
      516 |         expect(vscode.commands.executeCommand.mock.calls[0][0]).toStrictEqual(contextVariables.setContext);
      517 |         expect(vscode.commands.executeCommand.mock.calls[0][1]).toStrictEqual(contextVariables.showLogIn);

      at Object.toHaveBeenCalledTimes (tests/extension.test.js:514:48)


  ● Test suite failed to run

    Jest worker encountered 4 child process exceptions, exceeding retry limit

      at ChildProcessWorker.initialize (node_modules/jest-worker/build/workers/ChildProcessWorker.js:181:21)

Report generated by 🧪jest coverage report action from 02dc2b0

@codesyncapp
Copy link

codesyncapp bot commented Apr 26, 2024

Check out the playback for this Pull Request here.

@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants