Assuming there's a /test folder with .txt files in it. Note how the * character is escaped to prevent expansion.
Linux and Cygwin
find /test -name \*.txt -exec sed -i 's/oldValue/newValue/g' {} \;
macOS
In sed the -i option edits files in-place instead of printing to standard output and requires a file extension.
Use "" to overwrite the file in place.