Skip to content

Commit b037c6a

Browse files
justin808claude
andcommitted
Fix TypeScript test expectations to match improved code
Updated test expectations to match the improved TypeScript patterns that rely on inference instead of explicit type annotations, per alexeyr-ci2's code review suggestions. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 054dff3 commit b037c6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/react_on_rails/generators/install_generator_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
assert_file "app/javascript/src/HelloWorld/ror_components/HelloWorld.client.tsx" do |content|
5353
expect(content).to match(/interface HelloWorldProps/)
5454
expect(content).to match(/React\.FC<HelloWorldProps>/)
55-
expect(content).to match(/React\.ChangeEvent<HTMLInputElement>/)
55+
expect(content).to match(/onChange=\{.*e.*=>.*setName\(e\.target\.value\).*\}/)
5656
end
5757
end
5858
end
@@ -113,7 +113,7 @@
113113
it "TypeScript Redux App includes proper typing" do
114114
assert_file "app/javascript/src/HelloWorldApp/ror_components/HelloWorldApp.client.tsx" do |content|
115115
expect(content).to match(/interface HelloWorldAppProps/)
116-
expect(content).to match(/React\.FC<HelloWorldAppProps>/)
116+
expect(content).to match(/FC<HelloWorldAppProps>/)
117117
end
118118
end
119119
end

0 commit comments

Comments
 (0)