serialization_json.spec.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import P from "./serialization.page.js";
  2. import { serializationTest } from "./serializationTest.js";
  3. describe("DataChannel:JSON", () => {
  4. beforeAll(
  5. async () => {
  6. await P.init();
  7. },
  8. jasmine.DEFAULT_TIMEOUT_INTERVAL,
  9. 2,
  10. );
  11. it(
  12. "should transfer numbers",
  13. serializationTest("./numbers", "json"),
  14. jasmine.DEFAULT_TIMEOUT_INTERVAL,
  15. 2,
  16. );
  17. it(
  18. "should transfer strings",
  19. serializationTest("./strings", "json"),
  20. jasmine.DEFAULT_TIMEOUT_INTERVAL,
  21. 2,
  22. );
  23. // it("should transfer long string", serializationTest("./long_string", "json"));
  24. it(
  25. "should transfer objects",
  26. serializationTest("./objects", "json"),
  27. jasmine.DEFAULT_TIMEOUT_INTERVAL,
  28. 2,
  29. );
  30. it(
  31. "should transfer arrays (no chunks)",
  32. serializationTest("./arrays_unchunked", "json"),
  33. jasmine.DEFAULT_TIMEOUT_INTERVAL,
  34. 2,
  35. );
  36. it(
  37. "should transfer Dates as strings",
  38. serializationTest("./dates_as_json_string", "json"),
  39. jasmine.DEFAULT_TIMEOUT_INTERVAL,
  40. 2,
  41. );
  42. // it("should transfer ArrayBuffers", serializationTest("./arraybuffers", "json"));
  43. // it("should transfer TypedArrayView", serializationTest("./typed_array_view", "json"));
  44. // it(
  45. // "should transfer Uint8Arrays",
  46. // serializationTest("./Uint8Array", "json"),
  47. // );
  48. // it(
  49. // "should transfer Int32Arrays",
  50. // serializationTest("./Int32Array", "json"),
  51. // );
  52. });