Method: React::Test::Session#html

Defined in:
lib/react/test/session.rb

#htmlObject



25
26
27
28
29
30
31
32
33
34
# File 'lib/react/test/session.rb', line 25

def html
  html = `#@container.innerHTML`
  %x{
      var REGEX_REMOVE_ROOT_IDS = /\s?data-reactroot="[^"]*"/g;
      var REGEX_REMOVE_IDS = /\s?data-reactid="[^"]+"/g;
      html = html.replace(REGEX_REMOVE_ROOT_IDS, '');
      html = html.replace(REGEX_REMOVE_IDS, '');
  }
  return html
end