Base mock of obsidian and global variables window and document
This commit is contained in:
parent
edbe4b7958
commit
e5b9a58158
|
@ -0,0 +1,22 @@
|
||||||
|
module.exports = {
|
||||||
|
Vault: {},
|
||||||
|
Workspace: {},
|
||||||
|
Plugin: class {
|
||||||
|
addCommand() { }
|
||||||
|
addRibbonIcon() { }
|
||||||
|
addSettingTab() { }
|
||||||
|
addStatusBarItem() { return { setText: () => { } }; }
|
||||||
|
loadData() { }
|
||||||
|
registerDomEvent() { }
|
||||||
|
registerInterval() { }
|
||||||
|
},
|
||||||
|
Modal: class { },
|
||||||
|
PluginSettingTab: class { },
|
||||||
|
TFolder: class { },
|
||||||
|
};
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
|
const JSDOM = require("jsdom").JSDOM
|
||||||
|
const dom = new JSDOM()
|
||||||
|
global.document = dom.window.document
|
||||||
|
global.window = dom.window
|
Loading…
Reference in New Issue