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

Yarn test failed with Sync service WebDAV › initServer › should reject with "mkcol" if cannot create dir #1812

Open
hsiong opened this issue Aug 11, 2022 · 0 comments

Comments

@hsiong
Copy link

hsiong commented Aug 11, 2022

Device info

  • OS: macOS Monterey 12.5
  • Saladict Version: dev branch
  • yarn Version: 1.22.19
  • node-fetch Version: ^2.6.7
    I changed node-fetch version reference to All tests fail #1779 .

Describe the bug

When running yarn test, the result is :
Test Suites: 1 failed, 21 passed, 22 of 35 total

The following is my log:

 FAIL  test/specs/background/sync-manager/services/webdav.spec.ts
  ● Sync service WebDAV › initServer › should do nothing if local files are older

    exist

      193 |       // An old file exists on server.
      194 |       // Let user decide whether to upload.
    > 195 |       throw new Error('exist')
          |             ^
      196 |     }
      197 |   }
      198 |

      at Service.init (src/background/sync-manager/services/webdav/index.ts:195:13)
      at Object.<anonymous> (test/specs/background/sync-manager/services/webdav.spec.ts:566:7)

  ● Sync service WebDAV › initServer › should reject with "mkcol" if cannot create dir

    expect(received).toBe(expected) // Object.is equality

    Expected: "mkcol"
    Received: "exist"

      643 |         await service.init()
      644 |       } catch (e) {
    > 645 |         expect(e.message).toBe('mkcol')
          |                           ^
      646 |       }
      647 |
      648 |       expect(service.download).toHaveBeenCalledTimes(0)

      at Object.<anonymous> (test/specs/background/sync-manager/services/webdav.spec.ts:645:27)

Summary of all failing tests
 FAIL  test/specs/background/sync-manager/services/webdav.spec.ts
  ● Sync service WebDAV › initServer › should do nothing if local files are older

    exist

      193 |       // An old file exists on server.
      194 |       // Let user decide whether to upload.
    > 195 |       throw new Error('exist')
          |             ^
      196 |     }
      197 |   }
      198 |

      at Service.init (src/background/sync-manager/services/webdav/index.ts:195:13)
      at Object.<anonymous> (test/specs/background/sync-manager/services/webdav.spec.ts:566:7)

  ● Sync service WebDAV › initServer › should reject with "mkcol" if cannot create dir

    expect(received).toBe(expected) // Object.is equality

    Expected: "mkcol"
    Received: "exist"

      643 |         await service.init()
      644 |       } catch (e) {
    > 645 |         expect(e.message).toBe('mkcol')
          |                           ^
      646 |       }
      647 |
      648 |       expect(service.download).toHaveBeenCalledTimes(0)

      at Object.<anonymous> (test/specs/background/sync-manager/services/webdav.spec.ts:645:27)


Test Suites: 1 failed, 21 passed, 22 of 35 total
Tests:       2 failed, 105 passed, 107 total
Snapshots:   0 total
Time:        10.787 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Expected behavior

Once the command yarn test is completed, the result might be all passed.

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

No branches or pull requests

1 participant