diff --git a/WebExample/__tests__/input.spec.ts b/WebExample/__tests__/input.spec.ts index c33b208f..7854dcb4 100644 --- a/WebExample/__tests__/input.spec.ts +++ b/WebExample/__tests__/input.spec.ts @@ -1,5 +1,5 @@ import {test, expect} from '@playwright/test'; -import * as TEST_CONST from '../../testConstants'; +import * as TEST_CONST from './testConstants'; import {checkCursorPosition, setupInput} from './utils'; test.beforeEach(async ({page}) => { diff --git a/WebExample/__tests__/styles.spec.ts b/WebExample/__tests__/styles.spec.ts index 44e65e94..2fc87dc5 100644 --- a/WebExample/__tests__/styles.spec.ts +++ b/WebExample/__tests__/styles.spec.ts @@ -1,6 +1,6 @@ import {test, expect} from '@playwright/test'; import type {Page} from '@playwright/test'; -import * as TEST_CONST from '../../testConstants'; +import * as TEST_CONST from './testConstants'; import {setupInput, getElementStyle} from './utils'; const testMarkdownContentStyle = async ({testContent, style, page}: {testContent: string; style: string; page: Page}) => { diff --git a/testConstants.ts b/WebExample/__tests__/testConstants.ts similarity index 100% rename from testConstants.ts rename to WebExample/__tests__/testConstants.ts diff --git a/WebExample/__tests__/textManipulation.spec.ts b/WebExample/__tests__/textManipulation.spec.ts index aa2b9203..d117da39 100644 --- a/WebExample/__tests__/textManipulation.spec.ts +++ b/WebExample/__tests__/textManipulation.spec.ts @@ -1,6 +1,6 @@ import {test, expect} from '@playwright/test'; import type {Locator, Page} from '@playwright/test'; -import * as TEST_CONST from '../../testConstants'; +import * as TEST_CONST from './testConstants'; import {checkCursorPosition, setupInput, getElementStyle, pressCmd} from './utils'; const pasteContent = async ({text, page, inputLocator}: {text: string; page: Page; inputLocator: Locator}) => { diff --git a/WebExample/__tests__/utils.ts b/WebExample/__tests__/utils.ts index 83ebb0bc..f50e6684 100644 --- a/WebExample/__tests__/utils.ts +++ b/WebExample/__tests__/utils.ts @@ -1,5 +1,5 @@ import type {Locator, Page} from '@playwright/test'; -import * as TEST_CONST from '../../testConstants'; +import * as TEST_CONST from './testConstants'; const setupInput = async (page: Page, action?: 'clear' | 'reset') => { const inputLocator = await page.locator(`div#${TEST_CONST.INPUT_ID}`); diff --git a/WebExample/playwright.config.ts b/WebExample/playwright.config.ts index 5b4aef9e..0cf53a25 100644 --- a/WebExample/playwright.config.ts +++ b/WebExample/playwright.config.ts @@ -1,5 +1,5 @@ import {defineConfig, devices} from '@playwright/test'; -import * as TEST_CONST from '../testConstants'; +import * as TEST_CONST from './__tests__/testConstants'; export default defineConfig({ testDir: './__tests__', diff --git a/WebExample/tsconfig.json b/WebExample/tsconfig.json index a1d289f6..5ede5186 100644 --- a/WebExample/tsconfig.json +++ b/WebExample/tsconfig.json @@ -3,6 +3,6 @@ "compilerOptions": { "strict": true }, - "include": ["App.tsx", "**/*.ts", "../testConstants.ts"], + "include": ["App.tsx", "**/*.ts", "__tests__/testConstants.ts"], "exclude": ["node_modules"] } diff --git a/example/src/App.tsx b/example/src/App.tsx index 2f5918d7..71648f56 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -4,7 +4,7 @@ import {Button, Platform, StyleSheet, Text, View} from 'react-native'; import {MarkdownTextInput} from '@expensify/react-native-live-markdown'; import type {TextInput} from 'react-native'; -import * as TEST_CONST from '../../testConstants'; +import * as TEST_CONST from '../../WebExample/__tests__/testConstants'; function isWeb() { return Platform.OS === 'web'; @@ -150,7 +150,6 @@ export default function App() { testID="clear" title="Clear" onPress={() => { - console.log('TEST'); setValue(''); }} /> diff --git a/tsconfig.json b/tsconfig.json index f0a6530f..b8a0c641 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -26,6 +26,6 @@ "verbatimModuleSyntax": true, "typeRoots": ["node_modules/@types"] }, - "include": ["src/**/*", "types/global.d.ts", "testConstants.ts"], + "include": ["src/**/*", "types/global.d.ts"], "exclude": ["**/node_modules/**/*", "parser/**/*", "**/lib/**/*", "example/src/**/*", "WebExample/**/*"] }