diff --git a/tests/e2e/merge.js b/tests/e2e/merge.ts similarity index 100% rename from tests/e2e/merge.js rename to tests/e2e/merge.ts diff --git a/tests/e2e/nativeCommands/adbBackspace.js b/tests/e2e/nativeCommands/adbBackspace.ts similarity index 87% rename from tests/e2e/nativeCommands/adbBackspace.js rename to tests/e2e/nativeCommands/adbBackspace.ts index 7b01ed58080d..2891d1daf0e9 100644 --- a/tests/e2e/nativeCommands/adbBackspace.js +++ b/tests/e2e/nativeCommands/adbBackspace.ts @@ -1,7 +1,7 @@ import execAsync from '../utils/execAsync'; import * as Logger from '../utils/logger'; -const adbBackspace = async () => { +const adbBackspace = () => { Logger.log(`πŸ”™ Pressing backspace`); execAsync(`adb shell input keyevent KEYCODE_DEL`); return true; diff --git a/tests/e2e/nativeCommands/adbTypeText.js b/tests/e2e/nativeCommands/adbTypeText.ts similarity index 85% rename from tests/e2e/nativeCommands/adbTypeText.js rename to tests/e2e/nativeCommands/adbTypeText.ts index b8c6cfd09c29..72fefbd25d26 100644 --- a/tests/e2e/nativeCommands/adbTypeText.js +++ b/tests/e2e/nativeCommands/adbTypeText.ts @@ -1,7 +1,7 @@ import execAsync from '../utils/execAsync'; import * as Logger from '../utils/logger'; -const adbTypeText = async (text) => { +const adbTypeText = (text: string) => { Logger.log(`πŸ“ Typing text: ${text}`); execAsync(`adb shell input text "${text}"`); return true; diff --git a/tests/e2e/server/index.ts b/tests/e2e/server/index.ts index 7e7c34959655..1827f507c496 100644 --- a/tests/e2e/server/index.ts +++ b/tests/e2e/server/index.ts @@ -139,16 +139,15 @@ const createServerInstance = (): ServerInstance => { case Routes.testNativeCommand: { getPostJSONRequestData(req, res) - ?.then((data) => - nativeCommands.executeFromPayload(data?.actionName, data?.payload).then((status) => { - if (status) { - res.end('ok'); - return; - } - res.statusCode = 500; - res.end('Error executing command'); - }), - ) + ?.then((data) => { + const status = nativeCommands.executeFromPayload(data?.actionName, data?.payload); + if (status) { + res.end('ok'); + return; + } + res.statusCode = 500; + res.end('Error executing command'); + }) .catch((error) => { Logger.error('Error executing command', error); res.statusCode = 500; diff --git a/tests/perf-test/GooglePlacesUtils.perf-test.js b/tests/perf-test/GooglePlacesUtils.perf-test.ts similarity index 95% rename from tests/perf-test/GooglePlacesUtils.perf-test.js rename to tests/perf-test/GooglePlacesUtils.perf-test.ts index 674fb4329205..1dd64feb23e0 100644 --- a/tests/perf-test/GooglePlacesUtils.perf-test.js +++ b/tests/perf-test/GooglePlacesUtils.perf-test.ts @@ -1,7 +1,8 @@ +/* eslint-disable @typescript-eslint/naming-convention */ import {measureFunction} from 'reassure'; -import * as GooglePlacesUtils from '../../src/libs/GooglePlacesUtils'; +import * as GooglePlacesUtils from '@src/libs/GooglePlacesUtils'; -const addressComponents = [ +const addressComponents: GooglePlacesUtils.AddressComponent[] = [ { long_name: 'Bushwick', short_name: 'Bushwick', @@ -34,7 +35,7 @@ const addressComponents = [ }, ]; -const bigObjectToFind = { +const bigObjectToFind: GooglePlacesUtils.FieldsToExtract = { sublocality: 'long_name', administrative_area_level_1: 'short_name', postal_code: 'long_name', diff --git a/tests/unit/removeInvisibleCharacters.js b/tests/unit/removeInvisibleCharacters.ts similarity index 98% rename from tests/unit/removeInvisibleCharacters.js rename to tests/unit/removeInvisibleCharacters.ts index 98d1c7c71baf..8294b8cefc5f 100644 --- a/tests/unit/removeInvisibleCharacters.js +++ b/tests/unit/removeInvisibleCharacters.ts @@ -1,6 +1,5 @@ -import _ from 'underscore'; -import enEmojis from '../../assets/emojis/en'; -import StringUtils from '../../src/libs/StringUtils'; +import enEmojis from '@assets/emojis/en'; +import StringUtils from '@src/libs/StringUtils'; describe('libs/StringUtils.removeInvisibleCharacters', () => { it('basic tests', () => { @@ -80,7 +79,7 @@ describe('libs/StringUtils.removeInvisibleCharacters', () => { expect(StringUtils.removeInvisibleCharacters('testπŸ˜€πŸ˜€πŸ˜€')).toBe('testπŸ˜€πŸ˜€πŸ˜€'); }); it('all emojis not removed', () => { - _.keys(enEmojis).forEach((key) => { + Object.keys(enEmojis).forEach((key) => { expect(StringUtils.removeInvisibleCharacters(key)).toBe(key); }); });