(zipPath: string)
| 11 | import { registerImportRoutes } from './import' |
| 12 | |
| 13 | function createTakeoutZip(zipPath: string): void { |
| 14 | writeZipFixture(zipPath, [ |
| 15 | { |
| 16 | name: 'Takeout/Google Chat/Users/User sample/user_info.json', |
| 17 | content: JSON.stringify({ |
| 18 | user: { email: 'owner@example.com', name: 'Owner', user_type: 'Human' }, |
| 19 | }), |
| 20 | }, |
| 21 | { |
| 22 | name: 'Takeout/Google Chat/Groups/DM sample/group_info.json', |
| 23 | content: JSON.stringify({ |
| 24 | members: [ |
| 25 | { email: 'owner@example.com', name: 'Owner', user_type: 'Human' }, |
| 26 | { email: 'other@example.com', name: 'Other User', user_type: 'Human' }, |
| 27 | ], |
| 28 | }), |
| 29 | }, |
| 30 | { |
| 31 | name: 'Takeout/Google Chat/Groups/DM sample/messages.json', |
| 32 | content: JSON.stringify({ messages: [] }), |
| 33 | }, |
| 34 | ]) |
| 35 | } |
| 36 | |
| 37 | function multipartPayload(fileName: string, file: Buffer): { payload: Buffer; contentType: string } { |
| 38 | const boundary = '----chatlab-import-source-test' |
no test coverage detected