/ utils / test / testUpload.ts
testUpload.ts
 1  import { SupportedLocale, submitFirefox } from '@coub-addons/publish-extension';
 2  
 3  import { description, dryRun, releaseNotes } from '../upload/common';
 4  import { jwtIssuer, jwtSecret, testExtensionId } from '../upload/init-firefox';
 5  import { createTestZips } from './createTestZips';
 6  
 7  if (!testExtensionId) {
 8  	throw new Error('FIREFOX_TEST_EXTENSION_ID is not defined');
 9  }
10  
11  console.log('----------------------------\n');
12  
13  const { firefoxExtPath, firefoxSourcesPath } = await createTestZips();
14  
15  console.log(`
16  Test extension:
17  - ext: ${firefoxExtPath}
18  - sources: ${firefoxSourcesPath}
19  `);
20  
21  await submitFirefox({
22  	dryRun,
23  	extensionId: testExtensionId,
24  	channel: 'unlisted',
25  	env: process.env.AMO_ORIGIN,
26  	extensionZipPath: firefoxExtPath,
27  	sourcesZipPath: firefoxSourcesPath,
28  	jwtIssuer,
29  	jwtSecret,
30  	description,
31  	releaseNotes: {
32  		[SupportedLocale.EN_US]: releaseNotes,
33  	},
34  });