mirror of
https://github.com/nathonius/obsidian-github-link.git
synced 2026-07-22 09:20:25 +00:00
🚨 test: #155 Add file sections to tests
This commit is contained in:
parent
1b4317c3b9
commit
dd3bfaa15f
1 changed files with 3 additions and 2 deletions
|
|
@ -7,6 +7,7 @@ const selectors = {
|
|||
repo: ".github-link-inline-repo",
|
||||
issueTitle: ".github-link-inline-issue-title",
|
||||
prTitle: ".github-link-inline-pr-title",
|
||||
file: ".github-link-inline-file",
|
||||
};
|
||||
|
||||
describe("createTag", () => {
|
||||
|
|
@ -23,7 +24,7 @@ describe("createTag", () => {
|
|||
expect(tag).toBeTruthy();
|
||||
const org = tag?.querySelector(selectors.org) as HTMLSpanElement;
|
||||
expect(org.innerText).toEqual(user);
|
||||
[selectors.repo, selectors.issueTitle, selectors.prTitle].forEach((s) => {
|
||||
[selectors.repo, selectors.issueTitle, selectors.prTitle, selectors.file].forEach((s) => {
|
||||
expect(tag?.querySelector(s)).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
|
@ -38,7 +39,7 @@ describe("createTag", () => {
|
|||
const repoEl = tag?.querySelector(selectors.repo) as HTMLSpanElement;
|
||||
expect(org.innerText).toEqual(user);
|
||||
expect(repoEl.innerText).toEqual(repo);
|
||||
[selectors.issueTitle, selectors.prTitle].forEach((s) => {
|
||||
[selectors.issueTitle, selectors.prTitle, selectors.file].forEach((s) => {
|
||||
expect(tag?.querySelector(s)).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue