是否有经过适当测试的替代选择2或选择? [英] Is there a properly tested alternative to Select2 or Chosen?

查看:174
本文介绍了是否有经过适当测试的替代选择2或选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



对圣杯的追求是什么?我们正在寻找一种替代品,它基本上提供了相同的功能,但包括适当的测试。最后一只独角兽?

解决方案

Selectize.js 是我一直在研究的select2选择,它有一套使用 testem syn 摩卡咖啡,以及 chai 。现在有以下类型的测试:




  • 交互
    功能测试确保控制就像用户使用它一样(使用 syn )。

  • Setup
    确保可以从现有的< select> < input> 元素。

  • API

  • 测试核心API方法的正确功能。 strong> Events

    确保内置事件在正确的时间被正确的参数触发。
  • XSS
    测试a少数潜在的漏洞。



这就是说,测试并不像我希望的那样广阔,但它已经到了:)

I am looking for an alternative to Select2 that basically provides the same functionality, but includes proper tests.

The quest for the holy grail? The last unicorn?

解决方案

Selectize.js is a select2 alternative I've been working on that has a suite of tests using a combination of testem, syn, mocha, and chai. Right now there are the following classes of tests:

  • Interaction
    Functional tests that makes sure the control behaves as if the user is using it (using syn).
  • Setup
    Ensures the control can be initialized properly from existing <select> and <input> elements.
  • API
    Tests core API methods for proper functionality.
  • Events
    Ensures built-in events get fired at the right times with the proper arguments.
  • XSS
    Tests a handful of potential exploits.

With that said, the tests aren't as expansive as I want them to be, but it's getting there :)

这篇关于是否有经过适当测试的替代选择2或选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆