rendajs / Renda

A modern rendering engine for the web.
https://rendajs.org
MIT License
10 stars 4 forks source link

Include test utility functions in `src/` #884

Closed jespertheend closed 6 months ago

jespertheend commented 6 months ago

Functions like assertVecAlmostEquals and assertQuatAlmostEquals could be pretty useful in other projects that write unit tests for code that uses Renda.

Only issue with moving them to somewhere within src/ is that these functions import modules from https://deno.land/std. These are typescript files so bundling renda.js would likely break. And people importing renda in their browser without bundling will likely run into issues since browsers don't support TypeScript.

So we'll have to find a way to exclude these functions from the mod.js module graph somehow. Maybe we could rewrite deno.land/std in JavaScript?

jespertheend commented 6 months ago

Related: #778