diff --git a/src/utils/__snapshots__/manifest.test.ts.snap b/src/utils/__snapshots__/manifest.test.ts.snap new file mode 100644 index 0000000..91c5657 --- /dev/null +++ b/src/utils/__snapshots__/manifest.test.ts.snap @@ -0,0 +1,52 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`buildManifest has checked handler with appropriate config 1`] = ` +[ + { + "default": "checked", + "key": "de", + "title": "German 🇩🇪 (KinoKiste, MeineCloud)", + "type": "checkbox", + }, + { + "key": "es", + "title": "Castilian Spanish 🇪🇸 (VerHdLink)", + "type": "checkbox", + }, + { + "key": "mx", + "title": "Latin American Spanish 🇲🇽 (VerHdLink)", + "type": "checkbox", + }, + { + "key": "excludeExternalUrls", + "title": "Exclude external URLs from results", + "type": "checkbox", + }, +] +`; + +exports[`buildManifest has unchecked handler without a config 1`] = ` +[ + { + "key": "de", + "title": "German 🇩🇪 (KinoKiste, MeineCloud)", + "type": "checkbox", + }, + { + "key": "es", + "title": "Castilian Spanish 🇪🇸 (VerHdLink)", + "type": "checkbox", + }, + { + "key": "mx", + "title": "Latin American Spanish 🇲🇽 (VerHdLink)", + "type": "checkbox", + }, + { + "key": "excludeExternalUrls", + "title": "Exclude external URLs from results", + "type": "checkbox", + }, +] +`; diff --git a/src/utils/manifest.test.ts b/src/utils/manifest.test.ts index c0ab4f3..eb2ab3f 100644 --- a/src/utils/manifest.test.ts +++ b/src/utils/manifest.test.ts @@ -20,12 +20,7 @@ describe('buildManifest', () => { const manifest = buildManifest(handlers, {}); - expect(manifest.config).toStrictEqual([ - { key: 'de', type: 'checkbox', title: 'German 🇩🇪 (KinoKiste, MeineCloud)' }, - { key: 'es', type: 'checkbox', title: 'Castilian Spanish 🇪🇸 (VerHdLink)' }, - { key: 'mx', type: 'checkbox', title: 'Latin American Spanish 🇲🇽 (VerHdLink)' }, - { key: 'excludeExternalUrls', type: 'checkbox', title: 'Exclude external URLs from results' }, - ]); + expect(manifest.config).toMatchSnapshot(); }); test('has checked handler with appropriate config', () => { @@ -37,11 +32,6 @@ describe('buildManifest', () => { ]; const manifest = buildManifest(handlers, { de: 'on' }); - expect(manifest.config).toStrictEqual([ - { key: 'de', type: 'checkbox', title: 'German 🇩🇪 (KinoKiste, MeineCloud)', default: 'checked' }, - { key: 'es', type: 'checkbox', title: 'Castilian Spanish 🇪🇸 (VerHdLink)' }, - { key: 'mx', type: 'checkbox', title: 'Latin American Spanish 🇲🇽 (VerHdLink)' }, - { key: 'excludeExternalUrls', type: 'checkbox', title: 'Exclude external URLs from results' }, - ]); + expect(manifest.config).toMatchSnapshot(); }); });