application-delegate-spec.js 659 B

123456789101112131415161718
  1. /** @babel */
  2. import ApplicationDelegate from '../src/application-delegate';
  3. describe('ApplicationDelegate', function() {
  4. describe('set/getTemporaryWindowState', function() {
  5. it('can serialize object trees containing redundant child object references', async function() {
  6. const applicationDelegate = new ApplicationDelegate();
  7. const childObject = { c: 1 };
  8. const sentObject = { a: childObject, b: childObject };
  9. await applicationDelegate.setTemporaryWindowState(sentObject);
  10. const receivedObject = await applicationDelegate.getTemporaryWindowState();
  11. expect(receivedObject).toEqual(sentObject);
  12. });
  13. });
  14. });