Skip to content

Commit

Permalink
Adapted tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen committed Jun 14, 2024
1 parent e877b5b commit cd997cd
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions test/csdl2markdown.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,23 @@ vocabularies.forEach((v) => {
describe("OASIS Vocabularies", function () {
it("Validation without potentially referenced vocabularies", function () {
const filename = "Org.OData.Validation.V1.xml";
const markdown = lib.csdl2markdown(filename, input[filename]);
const markdown = lib.csdl2markdown(
"https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/" +
filename,
input[filename],
);
check(markdown, expected.Validation);
});

vocabularies.forEach((v) => {
it(v, function () {
const filename = `Org.OData.${v}.V1.xml`;
const markdown = lib.csdl2markdown(filename, input[filename], input);
const markdown = lib.csdl2markdown(
"https://github.com/oasis-tcs/odata-vocabularies/blob/main/vocabularies/" +
filename,
input[filename],
input,
);
check(markdown, expected[v]);
});
});
Expand Down Expand Up @@ -285,18 +294,18 @@ describe("Non-OASIS Vocabularies", function () {
"## Functions",
"",
'<a name="condense"></a>',
'### [condense](./overload.tst.xml#L11:~:text=<Function%20Name="-,condense,-")',
"### [condense](overload.tst.xml#L11)",
"",
"Overload 1",
"",
"Parameter|Type|Description",
":--------|:---|:----------",
'**[InputSet](./overload.tst.xml#L13:~:text=<Function%20Name="-,condense,-")**|\\[EntityType\\]|**Binding parameter**',
'[&rarr;](./overload.tst.xml#L14:~:text=<Function%20Name="-,condense,-")|\\[EntityType\\]|',
"**[InputSet](overload.tst.xml#L13)**|\\[EntityType\\]|**Binding parameter**",
"[&rarr;](overload.tst.xml#L14)|\\[EntityType\\]|",
"",
"",
'<a name="condense"></a>',
"### [condense](./overload.tst.xml#L16) *(Deprecated)*",
"### [condense](overload.tst.xml#L16) *(Deprecated)*",
"Deprecated in favor of overload 1",
"",
];
Expand Down

0 comments on commit cd997cd

Please sign in to comment.