(content: Content)
| 851 | const synchronizers: Synchronizer[] = new Array(10); |
| 852 | |
| 853 | const expectAllToHaveContent = async (content: Content) => { |
| 854 | const mergeableContent = stores[0].getMergeableContent(); |
| 855 | expect(mergeableContent).toMatchSnapshot(); |
| 856 | stores.forEach((store, s) => { |
| 857 | expect(store.getContent()).toEqual(content); |
| 858 | if (s > 0) { |
| 859 | expect(store.getMergeableContent()).toEqual(mergeableContent); |
| 860 | } |
| 861 | }); |
| 862 | expect( |
| 863 | synchronizers.reduce( |
| 864 | (total, synchronizer) => { |
| 865 | const stats = synchronizer.getSynchronizerStats(); |
| 866 | total.sends += stats.sends ?? 0; |
| 867 | total.receives += stats.receives ?? 0; |
| 868 | return total; |
| 869 | }, |
| 870 | {sends: 0, receives: 0}, |
| 871 | ), |
| 872 | ).toMatchSnapshot('stats'); |
| 873 | }; |
| 874 | |
| 875 | beforeEach(async () => { |
| 876 | await Promise.all( |
no test coverage detected
searching dependent graphs…