Skip to content

Commit

Permalink
Merge pull request #4 from guilhermerodz/feat/new-engine-v3
Browse files Browse the repository at this point in the history
Feat/new-engine-v3
  • Loading branch information
guilhermerodz authored Feb 19, 2024
2 parents 227405b + bac6e92 commit daedc1c
Show file tree
Hide file tree
Showing 19 changed files with 482 additions and 667 deletions.
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"resolveGlobalModules": true,
"tabWidth": 2,
"printWidth": 80,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid",
"endOfLine": "lf"
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "otp-input",
"version": "0.1.0",
"version": "0.2.0",
"description": "One-time password input component for React.",
"main": "index.js",
"module": "./dist/index.mjs",
Expand All @@ -25,7 +25,8 @@
"dev:website": "turbo run dev --filter=website...",
"dev:test": "turbo run dev --filter=test...",
"format": "prettier --write .",
"test": "playwright test"
"test": "playwright test",
"test:slow": "WINDOWED_TESTS=true playwright test"
},
"keywords": [
"react",
Expand Down
12 changes: 8 additions & 4 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig, devices } from '@playwright/test';
import { defineConfig, devices } from '@playwright/test'

/**
* Read environment variables from file.
Expand All @@ -21,11 +21,11 @@ export default defineConfig({
timeout: 5000,
},
/* Run tests in files in parallel */
fullyParallel: true,
fullyParallel: process.env.WINDOWED_TESTS ? false : true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 1 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand All @@ -34,6 +34,10 @@ export default defineConfig({
use: {
trace: 'on-first-retry',
baseURL: 'http://localhost:3039',
headless: process.env.WINDOWED_TESTS ? false : true,
launchOptions: {
slowMo: process.env.WINDOWED_TESTS ? 500 : 0,
},
},
webServer: {
command: 'npm run dev',
Expand All @@ -52,4 +56,4 @@ export default defineConfig({
// use: { ...devices['Pixel 5'] },
// },
// ],
});
})
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './input'
export * from './regexp'
Loading

0 comments on commit daedc1c

Please sign in to comment.