chain.js 1019 B

1234567891011121314151617181920212223
  1. "use strict";
  2. var Iterator = require("../../");
  3. module.exports = function (t, a) {
  4. var i1 = new Iterator(["raz", "dwa", "trzy"])
  5. , i2 = new Iterator(["cztery", "pięć", "sześć"])
  6. , i3 = new Iterator(["siedem", "osiem", "dziewięć"])
  7. , iterator = t.call(i1, i2, i3);
  8. a.deep(iterator.next(), { done: false, value: "raz" }, "#1");
  9. a.deep(iterator.next(), { done: false, value: "dwa" }, "#2");
  10. a.deep(iterator.next(), { done: false, value: "trzy" }, "#3");
  11. a.deep(iterator.next(), { done: false, value: "cztery" }, "#4");
  12. a.deep(iterator.next(), { done: false, value: "pięć" }, "#5");
  13. a.deep(iterator.next(), { done: false, value: "sześć" }, "#6");
  14. a.deep(iterator.next(), { done: false, value: "siedem" }, "#7");
  15. a.deep(iterator.next(), { done: false, value: "osiem" }, "#8");
  16. a.deep(iterator.next(), { done: false, value: "dziewięć" }, "#9");
  17. a.deep(iterator.next(), { done: true, value: undefined }, "Done #1");
  18. a.deep(iterator.next(), { done: true, value: undefined }, "Done #2");
  19. };