Commit b19a9f7
committed
Replace bun with junit-js for JS tests; fix inline validator generation bug (#31)
- Add junit-js 2.0.0 dependency with GraalVM exclusions to avoid version conflicts
- Add JUnit Vintage engine to run JUnit 4 tests under JUnit 5 Platform
- Configure Surefire to discover *TestSuite.java files
- Delete bun-based src/test/js/ directory (replaced by junit-js)
- Add JtdEsmJsTestSuite.java to run JS tests via @RunWith(JSRunner.class)
- Add boolean-schema.test.js and nested-elements-empty-focused.test.js
- Tests run in GraalVM polyglot, no external JS runtime needed
- Fix EsmRenderer bug where inline validator functions were never emitted:
- Add generateInlineFunctions() method to emit collected inline validators
- Fix collision issue by using counter instead of hashCode for function names
- Support nested elements/schemas that require multiple inline validators
Test results: 29 tests pass in jtd-esm-codegen (17 Java + 2 property + 10 JS)1 parent 9c9d5e2 commit b19a9f7
File tree
10 files changed
+690
-811
lines changed- jtd-esm-codegen
- src
- main/java/io/github/simbo1905/json/jtd/codegen
- test
- java/io/github/simbo1905/json/jtd/codegen
- js
- resources
10 files changed
+690
-811
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
66 | 111 | | |
67 | 112 | | |
68 | 113 | | |
| |||
87 | 132 | | |
88 | 133 | | |
89 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
90 | 143 | | |
91 | 144 | | |
92 | 145 | | |
| |||
0 commit comments