1import { createMetadataJson } from '../createMetadataJson'; 2 3describe(createMetadataJson, () => { 4 it(`writes metadata manifest`, async () => { 5 const metadata = await createMetadataJson({ 6 fileNames: { 7 ios: 'ios-xxfooxxbarxx.js', 8 }, 9 bundles: { 10 ios: { 11 assets: [{ type: 'image', fileHashes: ['foobar', 'other'] } as any], 12 }, 13 }, 14 }); 15 16 expect(metadata).toStrictEqual({ 17 bundler: expect.any(String), 18 fileMetadata: { 19 ios: { 20 assets: [ 21 { 22 ext: 'image', 23 path: 'assets/foobar', 24 }, 25 { 26 ext: 'image', 27 path: 'assets/other', 28 }, 29 ], 30 bundle: 'bundles/ios-xxfooxxbarxx.js', 31 }, 32 }, 33 version: expect.any(Number), 34 }); 35 }); 36}); 37