<NME> amex.test.js
<BEF> ADDFILE
<MSG> chore: add test to all remaining scrapers

<DFF> @@ -0,0 +1,47 @@
+import AMEXScraper from './amex';
+import { maybeTestCompanyAPI, extendAsyncTimeout, getTestsConfig } from '../../tests/tests-utils';
+import { SCRAPERS } from '../definitions';
+import { LOGIN_RESULT } from '../constants';
+
+const COMPANY_ID = 'amex'; // TODO this property should be hard-coded in the provider
+const testsConfig = getTestsConfig();
+
+describe('AMEX legacy scraper', () => {
+  beforeAll(() => {
+    extendAsyncTimeout(); // The default timeout is 5 seconds per async test, this function extends the timeout value
+  });
+
+  test('should expose login fields in scrapers constant', () => {
+    expect(SCRAPERS.amex).toBeDefined();
+    expect(SCRAPERS.amex.loginFields).toContain('id');
+    expect(SCRAPERS.amex.loginFields).toContain('card6Digits');
+    expect(SCRAPERS.amex.loginFields).toContain('password');
+  });
+
+  maybeTestCompanyAPI(COMPANY_ID, config => config.companyAPI.invalidPassword)('should fail on invalid user/password"', async () => {
+    const options = {
+      ...testsConfig.options,
+      companyId: COMPANY_ID,
+    };
+
+    const scraper = new AMEXScraper(options);
+
+    const result = await scraper.scrape({ username: 'e10s12', password: '3f3ss3d' });
+
+    expect(result).toBeDefined();
+    expect(result.success).toBeFalsy();
+    expect(result.errorType).toBe(LOGIN_RESULT.INVALID_PASSWORD);
+  });
+
+  maybeTestCompanyAPI(COMPANY_ID)('should scrape transactions"', async () => {
+    const options = {
+      ...testsConfig.options,
+      companyId: COMPANY_ID,
+    };
+
+    const scraper = new AMEXScraper(options);
+    const result = await scraper.scrape(testsConfig.credentials.amex);
+    expect(result).toBeDefined();
+    expect(result.success).toBeTruthy();
+  });
+});

chore: add test to all remaining scrapers