my-idlers/node_modules/es6-iterator/test/string.js
cp6 fd22b0bf58 V2 (Laravel re-make)
V2 (Laravel re-make)
2022-03-06 02:02:12 +11:00

24 lines
848 B
JavaScript
Vendored

"use strict";
var iteratorSymbol = require("es6-symbol").iterator;
module.exports = function (T, a) {
var it = new T("foobar");
a(it[iteratorSymbol](), it, "@@iterator");
a.deep(it.next(), { done: false, value: "f" }, "#1");
a.deep(it.next(), { done: false, value: "o" }, "#2");
a.deep(it.next(), { done: false, value: "o" }, "#3");
a.deep(it.next(), { done: false, value: "b" }, "#4");
a.deep(it.next(), { done: false, value: "a" }, "#5");
a.deep(it.next(), { done: false, value: "r" }, "#6");
a.deep(it.next(), { done: true, value: undefined }, "End");
a.h1("Outside of BMP");
it = new T("r💩z");
a.deep(it.next(), { done: false, value: "r" }, "#1");
a.deep(it.next(), { done: false, value: "💩" }, "#2");
a.deep(it.next(), { done: false, value: "z" }, "#3");
a.deep(it.next(), { done: true, value: undefined }, "End");
};