Skip to content

Commit

Permalink
Add test for |var:Generic<NullableType?>|
Browse files Browse the repository at this point in the history
Test for speced#4708
  • Loading branch information
nondebug committed May 10, 2024
1 parent 0b1e302 commit eb92f05
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/spec/core/inlines-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ describe("Core - Inlines", () => {
<p id="h"> TEXT |var: Generic&lt;int&gt;| TEXT |var2: Generic&lt;unsigned short int&gt;| </p>
</section>
<section>
<p id="nulls"> |var 1: null type spaces?| and |var 2 : NullableType?| </p>
<p id="nulls"> |var 1: null type spaces?| and |var 2 : NullableType?| and |var 3: Generic&lt;NullableType?&gt;|</p>
</section>
`;
const doc = await makeRSDoc(makeStandardOps(null, body));
Expand Down Expand Up @@ -223,11 +223,14 @@ describe("Core - Inlines", () => {
expect(h[1].textContent).toBe("var2");
expect(h[1].dataset.type).toBe("Generic<unsigned short int>");

const [nullVar1, nullVar2] = doc.querySelectorAll("#nulls > var");
expect(nullVar1.textContent).toBe("var 1");
expect(nullVar1.dataset.type).toBe("null type spaces?");
expect(nullVar2.textContent).toBe("var 2");
expect(nullVar2.dataset.type).toBe("NullableType?");
const nulls = doc.querySelectorAll("#nulls > var");
expect(nulls).toHaveSize(3);
expect(nulls[0].textContent).toBe("var 1");
expect(nulls[0].dataset.type).toBe("null type spaces?");
expect(nulls[1].textContent).toBe("var 2");
expect(nulls[1].dataset.type).toBe("NullableType?");
expect(nulls[2].textContent).toBe("var 3");
expect(nulls[2].dataset.type).toBe("Generic<NullableType?>");
});

it("expands inline references and they get classified as normative/informative correctly", async () => {
Expand Down

0 comments on commit eb92f05

Please sign in to comment.