LZString.mjs 767 B

123456789101112131415161718192021222324252627282930313233
  1. /**
  2. * LZString tests.
  3. *
  4. * @author crespyl [peter@crespyl.net]
  5. * @copyright Peter Jacobs 2021
  6. * @license Apache-2.0
  7. */
  8. import TestRegister from "../../lib/TestRegister.mjs";
  9. TestRegister.addTests([
  10. {
  11. name: "LZString Compress To Base64",
  12. input: "hello world",
  13. expectedOutput: "BYUwNmD2AEDukCcwBMg=",
  14. recipeConfig: [
  15. {
  16. "op": "LZString Compress",
  17. "args": ["Base64"]
  18. }
  19. ],
  20. },
  21. {
  22. name: "LZString Decompress From Base64",
  23. input: "BYUwNmD2AEDukCcwBMg=",
  24. expectedOutput: "hello world",
  25. recipeConfig: [
  26. {
  27. "op": "LZString Decompress",
  28. "args": ["Base64"]
  29. }
  30. ],
  31. }
  32. ]);