string.js 848 B

1234567891011121314151617181920212223
  1. "use strict";
  2. var iteratorSymbol = require("es6-symbol").iterator;
  3. module.exports = function (T, a) {
  4. var it = new T("foobar");
  5. a(it[iteratorSymbol](), it, "@@iterator");
  6. a.deep(it.next(), { done: false, value: "f" }, "#1");
  7. a.deep(it.next(), { done: false, value: "o" }, "#2");
  8. a.deep(it.next(), { done: false, value: "o" }, "#3");
  9. a.deep(it.next(), { done: false, value: "b" }, "#4");
  10. a.deep(it.next(), { done: false, value: "a" }, "#5");
  11. a.deep(it.next(), { done: false, value: "r" }, "#6");
  12. a.deep(it.next(), { done: true, value: undefined }, "End");
  13. a.h1("Outside of BMP");
  14. it = new T("r💩z");
  15. a.deep(it.next(), { done: false, value: "r" }, "#1");
  16. a.deep(it.next(), { done: false, value: "💩" }, "#2");
  17. a.deep(it.next(), { done: false, value: "z" }, "#3");
  18. a.deep(it.next(), { done: true, value: undefined }, "End");
  19. };