index.spec.js 1.2 KB

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