柏树与Asciidoc(Asciidoctor)集成

发布于 2025-02-10 13:56:36 字数 67 浏览 0 评论 0原文

是否有任何工作方式将assiidoctor(asciidoc)集成到柏树中并使用两者进行测试?如果是,您可以解释如何做?

is thre any way to work integrate asciidoctor (asciidoc) into cypress and creating tests using both? If yes, could you please explane how to do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清风无影 2025-02-17 13:56:36

柏树是基于浏览器的测试套件。浏览器不会对ASCIIDOC进行本地处理,但是您可以使用asciidoctor.jsasciidoctor.js可以在浏览器中运行。

因此,您可以编写柏树测试,以确认使用asciidoctor.js是否按预期执行了所需的转换。

如何将Asciidoc标记进入浏览器取决于您。它可以嵌入页面中,可以用AJAX或JSONP请求获取,可以作为查询字符串参数提供。

Cypress is a browser-based test suite. Browsers don't natively process Asciidoc, but you can transform Asciidoc to HTML using asciidoctor.js, and asciidoctor.js can run in a browser.

So, you could write a Cypress test that confirmed whether the use of asciidoctor.js performed the desired transformation as expected.

How you get the Asciidoc markup into the browser is up to you. It could be embedded in the page, it could be fetched with an AJAX or JSONP request, it could be provided as a query string parameter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文