DesignLiquido / xslt-processor

A JavaScript XSLT processor without native library dependencies
GNU Lesser General Public License v3.0
102 stars 31 forks source link

Fix tests not building #14

Closed TheKnarf closed 5 years ago

TheKnarf commented 5 years ago

Running npm run build_tests did not initially work for me, these changes fixes that. (Hopefully I didn't break any of the tests).

Perhaps we could setup Travis CI (or some other CI) to build and run tests to ensure that new code don't break anything?

TheKnarf commented 5 years ago

While I can now build the legacy tests I'm still not sure how to run Jsunit?

johanneswilm commented 5 years ago

@TheKnarf I have been running jsunit in a browser and the test running worked for me during the upgrade from the pre-ES2015 code, which was quite useful as I could use it to check that everything was constantly running. Have you tried running them in a browser?

I agree on setting up Travis (or similar).

As for this patch - this doesn't look quite right to me (it looks a bit pre-ES2015 with the IIFEs - can you not just rename the second variable you declare with the same name or just leave out the let with the second declaration?). But I'll let you continue with this and then maybe we can clean this up together once you are done translating all the tests. Agreed?

johanneswilm commented 5 years ago

@TheKnarf I have merged your changes and removed the IIFEs in a way that is working at least for me. Please let me know if it is not working for you.