-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Jest #10
Comments
Investigation
|
@bhouston Please assign this to me. |
Sorry, I missed that you wanted me to assign it to you. I will track these issues a bit closer going forward. |
I notice a discussion here that seems to suggest that Jest is it. It is actually used by React-Create-App. i can likely port across a lot of the math tests from Three.js relatively quickly: https://github.com/mrdoob/three.js/tree/dev/test/unit/src/math |
I do not care if it is in test or beside the code. Go with whatever you feel is best for now and we can change it in the future if needed. |
# [1.2.0](v1.1.1...v1.2.0) (2020-06-26) ### Bug Fixes * restored example1 triangles index.ts file ([e7a420e](e7a420e)) * update directories in examples. ([d928c8c](d928c8c)) * **ci:** fix broken release action ([c304902](c304902)) * **ci:** fix checking master on master ([8ed115c](8ed115c)) * **eslint:** ignore JS example ([a4735fe](a4735fe)) * **eslint:** resolve tsconfig paths ([315d3b3](315d3b3)) ### Features * add debug renderer info support ([c22865a](c22865a)) * add Plane and Ray math primitives ([4f15436](4f15436)) * Add Plane geometry creator. ([46c88ee](46c88ee)) * add stride support to PrimitiveArray ([25d54bc](25d54bc)) * add support for 'WEBGL_debug_shaders' extension ([286f21b](286f21b)) * add support for optional anisotropy mipmaps ([5588055](5588055)) * depth texture example ([f85573e](f85573e)) * encodings work well ([5fcc413](5fcc413)) * example [#1](#1) - basic triangle. ([705ab3d](705ab3d)) * example 3, textured & indexed plane. ([ae9660a](ae9660a)) * example 4 lambert cube ([c6269d1](c6269d1)) * go back to WebGL1 with guarrenteed extensions. :( ([4b21a2e](4b21a2e)) * HDR loader WIP ([73f2581](73f2581)) * integration test support via ts-jest ([b9cadb7](b9cadb7)), closes [#10](#10) * interleaved buffers example (not yet working) ([f4c8620](f4c8620)) * optimize math class size and dependencies ([ca74267](ca74267)) * orthographic example, fix perspective camera sign bug, improve uniformity of maker-functions. ([fc62362](fc62362)) * render to texture example ([0f7b79d](0f7b79d)) * roughness example works ([0132ba9](0132ba9)) * second example, animated uniforms ([077d33e](077d33e)) * simplify framebuffer attachment creation ([515ebbe](515ebbe)) * tetrahedral, octahedron, isocahedron, dodecahedron, PrimitiveArray ([9c86560](9c86560)) * upgrade shaders to es 300 (WebGL2 only) ([62e7da7](62e7da7)) * use module facades in examples ([bd565fb](bd565fb))
Premise
Jest seems like a sane choice for a JavaScript unit testing framework. However it has some limitations and may not be straightforward to install.
Eg. using jest with a webpack based build system has challenges. I think the crux of problem is making jest understand various proposals and supersets of JavaScript. It seems that some plugins are available to help with this off the shelf (eg.
babel-jest
), while other configs may require the build tool to be customized.Proposal
Unless a framework better suited for TypeScript is identified, I would like to propose to move forward with implementing Jest.
Definition of done
npm i
oryarn
some.test.ts
will load the said file.some.test.ts
is to load some module from the library, preferably something simple.glsl
file if that happens)it()
block that instantiates a module, or calls some method if said module is static/singleton.The text was updated successfully, but these errors were encountered: