/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/cases/parsing/complex-require/index.js
28 строк
812 B
Bazyli Brzóska
migrate should to expect, part 2 (manual)
27 янв 2018, 01:59
27 янв 2018, 01:59
a6c2aca
Код
Авторство
О чём код?
it("should parse template strings in import", function(done) { var name = "abc".split(""); var suffix = "Test"; Promise.all([ import(`./abc/${name[0]}${name[1]}${name[2]}Test`), import(String.raw`./${name.join("")}/${name.join("")}Test`), import(String.raw`./abc/${name.join("")}${suffix}`) ]) .then(function (imports) { for (var i = 0; i < imports.length; i++) { expect(imports[i].default).toEqual("ok"); } }) .then(function () { done(); }, done) }); it("should parse .concat strings in import", function(done) { var name = "abc".split(""); var suffix = "Test"; import("./abc/".concat(name[0]).concat(name[1]).concat(name[2], "Test")) .then(function (imported) { expect(imported.default).toEqual("ok"); }) .then(function () { done(); }, done) }); require("./cjs") require("./amd")