简体   繁体   English

是否有任何 javascript 测试框架在没有 babel 或其他转译器的情况下原生支持 ES6 导入?

[英]Are there any javascript testing frameworks that natively support ES6 imports without babel or another transpiler?

I've developed a node 13.12 application that uses only ES6 style module imports.我开发了一个仅使用 ES6 样式模块导入的节点 13.12 应用程序。 Given that it's 2020, I'd like to use a testing framework that can natively support those imports without requiring Babel or any other transpiling.鉴于现在是 2020 年,我想使用一个测试框架,它可以原生支持这些导入,而不需要 Babel 或任何其他转译。 Does such a framework exist yet?这样的框架还存在吗?

At this point (May 2020) I have been unable to locate a testing framework that fits the bill.在这一点上(2020 年 5 月),我一直无法找到符合要求的测试框架。 I ended up rolling my own rudimentary one, wasn't as hard as I thought.我最终推出了自己的初级产品,并没有我想象的那么难。 Just reimplementing some of the common paradigms like "expect equals" and "expect error".只是重新实现一些常见的范例,如“预期等于”和“预期错误”。 Enough to get some testing done and move on with the real work.足以完成一些测试并继续进行实际工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM