tiagobento commented on code in PR #2207:
URL:
https://github.com/apache/incubator-kie-tools/pull/2207#discussion_r1537783207
##########
packages/dmn-marshaller/tests/idempotency.test.ts:
##########
@@ -20,30 +20,61 @@
import * as fs from "fs";
import * as path from "path";
import { getMarshaller } from "@kie-tools/dmn-marshaller";
+import { DmnMarshaller, DmnMarshallerOpts, DmnMarshallerVersions } from
"../src";
const files = [
- "../tests-data--manual/other/attachment.dmn",
- "../tests-data--manual/other/empty13.dmn",
- "../tests-data--manual/other/sample12.dmn",
- "../tests-data--manual/other/list.dmn",
- "../tests-data--manual/other/list2.dmn",
- "../tests-data--manual/other/external.dmn",
- "../tests-data--manual/other/weird.dmn",
- "../tests-data--manual/dmn-1_4--examples/Chapter 11 Example 1
Originations/Chapter 11 Example.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/AllowedValuesChecksInsideCollection.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/DateToDateTimeFunction.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/ForLoopDatesEvaluate.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/Imported_Model_Unamed.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/Importing_EmptyNamed_Model.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/ListReplaceEvaluate.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5/TypeConstraintsChecks.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_x/OneOfEachType.dmn",
+
"../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_x/allTypes.dmn",
+];
+
+const testing_models_paths = [
+ "../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_5",
+ "../node_modules/@kie-tools/dmn-testing-models/dist/valid_models/DMNv1_x",
];
Review Comment:
In order not make packages dependent on the directory structure of the
monorepo, for these cases we use
`require.resolve("@kie-tools/dmn-testing-models")`, using the package name,
instead of the package directory. The command above is like an import, but for
a directory inside a package. You can use `path.join` then to concatenate the
result of `require.resolve` with the path string you're pointing to. Keep in
mind that we need to support these tests on Windows as well, if I'm not
mistaken.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]