index.spec.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var _1 = require(".");
  4. var TEST_CASES = [
  5. ["", ""],
  6. ["test", "test"],
  7. ["TEST", "test"],
  8. ["test string", "test string"],
  9. ["TEST STRING", "test string"],
  10. ];
  11. var LOCALE_TEST_CASES = [
  12. ["STRING", "strıng", "tr"],
  13. ];
  14. describe("lower case", function () {
  15. var _loop_1 = function (input, result) {
  16. it(input + " -> " + result, function () {
  17. expect(_1.lowerCase(input)).toEqual(result);
  18. });
  19. };
  20. for (var _i = 0, TEST_CASES_1 = TEST_CASES; _i < TEST_CASES_1.length; _i++) {
  21. var _a = TEST_CASES_1[_i], input = _a[0], result = _a[1];
  22. _loop_1(input, result);
  23. }
  24. });
  25. describe("locale lower case", function () {
  26. var _loop_2 = function (input, result, locale) {
  27. it(locale + ": " + input + " -> " + result, function () {
  28. expect(_1.localeLowerCase(input, locale)).toEqual(result);
  29. });
  30. };
  31. for (var _i = 0, LOCALE_TEST_CASES_1 = LOCALE_TEST_CASES; _i < LOCALE_TEST_CASES_1.length; _i++) {
  32. var _a = LOCALE_TEST_CASES_1[_i], input = _a[0], result = _a[1], locale = _a[2];
  33. _loop_2(input, result, locale);
  34. }
  35. });
  36. //# sourceMappingURL=index.spec.js.map