Skip to content

Commit f75efea

Browse files
committed
Add sinks to unit test
1 parent 3ca167d commit f75efea

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

javascript/frameworks/ui5/test/models/source-react/controlledcomponent.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ function ControlledComponent( { props }) {
99
const handleButtonPress1 = () => {
1010
// Access the input value via the hook
1111
console.log('Current input value:', inputRef1.current.value); // SOURCE - not detected
12-
};
12+
$("#id").html(inputRef1.current.value); // $ Alert
13+
}
1314

1415
const handleButtonPress2 = event => {
1516
setInputValue(event.target.value); // SOURCE - detected
16-
console.log('Current input value:', inputRef2); // not directly a source
17+
console.log('Current input value:', inputRef2);
18+
$("#id").html(inputRef2); // $ Alert
1719
};
1820

1921
return (

0 commit comments

Comments
 (0)