count.js 296 B

1234567891011121314
  1. "use strict";
  2. module.exports = function (t, a) {
  3. a.throws(function () {
  4. t.call("", "");
  5. });
  6. a(t.call("x", "x"), 1);
  7. a(t.call("xx", "x"), 2);
  8. a(t.call("xxx", "xx"), 1);
  9. a(t.call("xxxx", "xx"), 2);
  10. a(t.call("xx", "xxx"), 0);
  11. a(t.call("", "elo"), 0);
  12. a(t.call("fooo", "foofooo"), 0);
  13. };