(restPath: string, query: Query)
| 40 | |
| 41 | describe('DataCollection', () => { |
| 42 | function createCollection(restPath: string, query: Query) { |
| 43 | const c = new DataCollection<TestDataClass>(); |
| 44 | c.open(restPath, query, new EmptyDataAccessor(), new TestDescriptor(), |
| 45 | new WebSocketClient('url', (_) => new MockWebSocket())); |
| 46 | return c; |
| 47 | } |
| 48 | |
| 49 | const expectArrayContents = (c: DataCollection<TestDataClass>, expected: [number, number][]) => { |
| 50 | expect(c.array.map(x => [x.testid, x.testdata])).toEqual(expected); |
no test coverage detected