diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e9293b4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20, 22] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: npm + - run: npm ci + - run: npm test diff --git a/test/semantic-matching.test.ts b/test/semantic-matching.test.ts index b959183..fdd55ff 100644 --- a/test/semantic-matching.test.ts +++ b/test/semantic-matching.test.ts @@ -20,6 +20,8 @@ const REACT_PACKAGE_JSON = ` `; describe('SemanticForwardRefMigration (Section 5: Semantic Matching)', () => { + jest.setTimeout(30_000); + test('matches forwardRef with named import (merges into existing import)', async () => { const spec = new RecipeSpec(); spec.recipe = new SemanticForwardRefMigration(); @@ -107,7 +109,7 @@ describe('SemanticForwardRefMigration (Section 5: Semantic Matching)', () => { const MyComponent = reactForwardRef(Component); `, ` - import {forwardRef, memo, forwardRef as reactForwardRef } from 'react'; + import { forwardRef, memo, forwardRef as reactForwardRef } from 'react'; const MyComponent = memo(forwardRef(Component)); ` // Note: Semantic matching FOUND it via the alias 'reactForwardRef'