0.1.5 • Published 8 months ago

obsidian-testing-framework v0.1.5

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

the Obsidian Testing Framework

what is this?

this is a library that (finally!) lets you end-to-end test your obsidian plugins. it uses playwright to interact with obsidian, which is an Electron app under the hood.

great! how do i use it?

basic usage

import {test} from "obsidian-testing-library";
test('obsidian app url', async ({ page }) => {
	console.log(page.url());
	expect(/obsidian\.md/i.test(page.url())).toBeTruthy()
});

usage with the app instance

test("idk", async({page}) => {
	console.log("idk")
	let tfile = await doWithApp(page, async (app) => {
		return app.metadataCache.getFirstLinkpathDest("Welcome", "/");
	});
	expect(tfile.basename).toEqual("Welcome")
})

other utilities

see src/util.ts for the currently included utilities and their documentation.

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago

0.1.0

8 months ago

0.0.7

8 months ago

0.0.6

8 months ago

0.0.5

8 months ago

0.0.4

8 months ago

0.0.1

8 months ago