Skip to content

Unit test with jest #2

Closed
Closed

Description

@songkg7

SSIA

Activity

  1. songkg7 commented on Feb 18, 2023

    @songkg7
    OwnerAuthor

    jest 를 통해 obsidian module 을 mocking 하지 못하는 issue 가 있다.

    https://github.com/obsidianmd/obsidian-api/issues/13

    아직 obsidian 이 충분히 성숙하지 않은 상태여서 그런 것으로 보인다.

    별로 마음에 들진 않지만, 구현을 테스트 코드로 일부 복사하며 검증하는 방법같이 원시적인 방법을 당분간 써보면서 해결 방안을 찾아봐야 할듯.

  2. songkg7 commented on Feb 18, 2023

    @songkg7
    OwnerAuthor
    jest.mock('obsidian', () => ({}), { virtual: true });

    로 해결

  3. added 2 commits that reference this issue on Feb 18, 2023
    82ecc19
    41465ce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions