Skip to content

Commit 629004c

Browse files
committed
updates
1 parent 1de6d99 commit 629004c

File tree

5 files changed

+41
-29
lines changed

5 files changed

+41
-29
lines changed

package-lock.json

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
"react-dom": "^18.3.1"
1616
},
1717
"devDependencies": {
18+
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
1819
"@eslint/js": "^9.15.0",
1920
"@testing-library/react": "^13.4.0",
21+
"@testing-library/user-event": "^14.5.2",
2022
"@types/react": "^18.3.12",
2123
"@types/react-dom": "^18.3.1",
2224
"@vitejs/plugin-react": "^4.3.4",

src/App.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
<ItemGroup>
88
<Compile Include="Components.fs" />
9-
<Compile Include="App.fs" />
109
<Compile Include="Components.test.fs" />
11-
<Compile Include="Counter.test.fs" />
10+
<Compile Include="App.fs" />
1211
</ItemGroup>
1312

1413
<ItemGroup>
14+
<PackageReference Include="Fable.Jester" Version="0.33.0" />
1515
<PackageReference Include="Feliz" Version="2.9.0" />
1616
<PackageReference Include="Feliz.Router" Version="4.0.0" />
1717
<PackageReference Include="Fable.ReactTestingLibrary" Version="0.33.0" />

src/Components.test.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ open Fable.Jester
55
open Feliz
66

77
// Import the main app component
8-
open App.Components
8+
open App
99

1010
Jest.describe("Counter component", fun () ->
1111
Jest.test("should render initial count", fun () ->
12-
RTL.render(Counter())
12+
RTL.render(Components.Counter())
1313
let countElement = RTL.screen.getByText("count is 0")
1414
Jest.expect(countElement).toBeInTheDocument()
1515
)
1616

1717
Jest.test("should increment count on button click", fun () ->
18-
RTL.render(Counter())
18+
RTL.render(Components.Counter())
1919
let buttonElement = RTL.screen.getByText("count is 0")
2020
RTL.fireEvent.click(buttonElement)
2121
let updatedButtonElement = RTL.screen.getByText("count is 1")

src/Counter.test.fs

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)