Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 #375

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

V2 #375

wants to merge 10 commits into from

Conversation

kantorcodes
Copy link
Contributor

Description:

Related issue(s):

Fixes #

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copy link

github-actions bot commented Dec 11, 2024

Coverage report

Caution

Coverage does not meet threshold
Branches coverage not met for global: expected >=50%, but got 48.45360824742268%

St.
Category Percentage Covered / Total
🔴 Statements
56.59% (-22.06% 🔻)
524/926
🔴 Branches
48.45% (-15.88% 🔻)
94/194
🔴 Functions
46.27% (-31.36% 🔻)
118/255
🔴 Lines
56.77% (-23.17% 🔻)
495/872
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / SignerMissingOnModalError.ts
0% 100% 0% 0%
🔴
... / HederaNetworkControllerClient.ts
0% 100% 0% 0%
🔴
... / HederaConnectionController.ts
0% 0% 0% 0%
🔴
... / chains.ts
0% 100% 100% 0%
🔴
... / WalletConnectProvider.ts
0% 0% 0% 0%
🔴 reown/adapter.ts 0% 0% 0% 0%

Test suite run failed

Failed tests: 8/155. Failed suites: 1/11.
  ● DefaultLogger › constructor › should set default log level to info

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test"
    Received: "[ERROR - Logger] test"

    Number of calls: 1

      32 |       logger.debug('test')
      33 |
    > 34 |       expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test')
         |                               ^
      35 |       expect(consoleWarnSpy).toHaveBeenCalledWith('[WARN] test')
      36 |       expect(consoleInfoSpy).toHaveBeenCalledWith('[INFO] test')
      37 |       expect(consoleDebugSpy).not.toHaveBeenCalled()

      at Object.<anonymous> (test/shared/logger.test.ts:34:31)

  ● DefaultLogger › constructor › should respect custom log level

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test"
    Received: "[ERROR - Logger] test"

    Number of calls: 1

      45 |       logger.debug('test')
      46 |
    > 47 |       expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test')
         |                               ^
      48 |       expect(consoleWarnSpy).toHaveBeenCalledWith('[WARN] test')
      49 |       expect(consoleInfoSpy).toHaveBeenCalledWith('[INFO] test')
      50 |       expect(consoleDebugSpy).toHaveBeenCalledWith('[DEBUG] test')

      at Object.<anonymous> (test/shared/logger.test.ts:47:31)

  ● DefaultLogger › setLogLevel › should update log level

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test"
    Received: "[ERROR - Logger] test"

    Number of calls: 1

      64 |       logger.debug('test')
      65 |
    > 66 |       expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test')
         |                               ^
      67 |       expect(consoleWarnSpy).not.toHaveBeenCalled()
      68 |       expect(consoleInfoSpy).not.toHaveBeenCalled()
      69 |       expect(consoleDebugSpy).not.toHaveBeenCalled()

      at Object.<anonymous> (test/shared/logger.test.ts:66:31)

  ● DefaultLogger › logging methods › error level › should only log errors

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test error"
    Received: "[ERROR - Logger] test error"

    Number of calls: 1

      83 |         logger.debug('test debug')
      84 |
    > 85 |         expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test error')
         |                                 ^
      86 |         expect(consoleWarnSpy).not.toHaveBeenCalled()
      87 |         expect(consoleInfoSpy).not.toHaveBeenCalled()
      88 |         expect(consoleDebugSpy).not.toHaveBeenCalled()

      at Object.<anonymous> (test/shared/logger.test.ts:85:33)

  ● DefaultLogger › logging methods › error level › should handle additional arguments

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    - Expected
    + Received

    - "[ERROR] test error",
    + "[ERROR - Logger] test error",
      {"details": "more info"},
      [Error: test],

    Number of calls: 1

      93 |         logger.error('test error', { details: 'more info' }, error)
      94 |
    > 95 |         expect(consoleErrorSpy).toHaveBeenCalledWith(
         |                                 ^
      96 |           '[ERROR] test error',
      97 |           { details: 'more info' },
      98 |           error,

      at Object.<anonymous> (test/shared/logger.test.ts:95:33)

  ● DefaultLogger › logging methods › warn level › should log errors and warnings

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test error"
    Received: "[ERROR - Logger] test error"

    Number of calls: 1

      112 |         logger.debug('test debug')
      113 |
    > 114 |         expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test error')
          |                                 ^
      115 |         expect(consoleWarnSpy).toHaveBeenCalledWith('[WARN] test warn')
      116 |         expect(consoleInfoSpy).not.toHaveBeenCalled()
      117 |         expect(consoleDebugSpy).not.toHaveBeenCalled()

      at Object.<anonymous> (test/shared/logger.test.ts:114:33)

  ● DefaultLogger › logging methods › info level › should log errors, warnings, and info

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test error"
    Received: "[ERROR - Logger] test error"

    Number of calls: 1

      130 |         logger.debug('test debug')
      131 |
    > 132 |         expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test error')
          |                                 ^
      133 |         expect(consoleWarnSpy).toHaveBeenCalledWith('[WARN] test warn')
      134 |         expect(consoleInfoSpy).toHaveBeenCalledWith('[INFO] test info')
      135 |         expect(consoleDebugSpy).not.toHaveBeenCalled()

      at Object.<anonymous> (test/shared/logger.test.ts:132:33)

  ● DefaultLogger › logging methods › debug level › should log all levels

    expect(jest.fn()).toHaveBeenCalledWith(...expected)

    Expected: "[ERROR] test error"
    Received: "[ERROR - Logger] test error"

    Number of calls: 1

      148 |         logger.debug('test debug')
      149 |
    > 150 |         expect(consoleErrorSpy).toHaveBeenCalledWith('[ERROR] test error')
          |                                 ^
      151 |         expect(consoleWarnSpy).toHaveBeenCalledWith('[WARN] test warn')
      152 |         expect(consoleInfoSpy).toHaveBeenCalledWith('[INFO] test info')
      153 |         expect(consoleDebugSpy).toHaveBeenCalledWith('[DEBUG] test debug')

      at Object.<anonymous> (test/shared/logger.test.ts:150:33)

Report generated by 🧪jest coverage report action from 542ae02

Signed-off-by: Tyler McDonald <[email protected]>
Signed-off-by: Tyler McDonald <[email protected]>
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