Suppose I have something like this page:
<noscript>You need JS for this page</noscript>
<script>
document.write('you have javascript');
$(function() { /* Some DOM heavy coding */ });
<script>
What will this look like to google? If someone searches google for “you have javascript” will they see my page?
The safest answer is: don’t rely on it. In particular because you’re doing heavy DOM coding.
If the code must be in Google for search purposes then create that part of the HTML on the server and use JavaScript only for interaction. Google’s web crawlers are getting smarter but I don’t expect them to understand arbitrary JavaScript code.