Skip to content

Commit

Permalink
fix tests by mocking obsidian
Browse files Browse the repository at this point in the history
  • Loading branch information
glowingjade committed Oct 23, 2024
1 parent f434b60 commit 1f03d90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions __mocks__/obsidian.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const App = jest.fn()
export const Editor = jest.fn()
export const MarkdownView = jest.fn()
export const TFile = jest.fn()
export const TFolder = jest.fn()
export const Vault = jest.fn()
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"skipLibCheck": true,
"resolveJsonModule": true
},
"include": ["src/**/*.ts", "src/**/*.tsx", "drizzle.config.ts"]
"include": ["src/**/*.ts", "src/**/*.tsx", "drizzle.config.ts", "__mocks__"]
}

0 comments on commit 1f03d90

Please sign in to comment.