lumpy-turnips / minty

Step by step visualization of node processess
MIT License
196 stars 6 forks source link

front-end code in the file being tested may cause graphViz code to be displayed unparsed #56

Open juniorbird opened 8 years ago

juniorbird commented 8 years ago

Example:


'use strict';
const minty = require('minty');
const http = require('http');

const testDoc = `
<html>
  <head>
    <title>Minty Node Example</title>
    <script type="text/javascript">
    var alertContent = 'If this alert shows, you have done a  great job!';

    function showAlert(string) {
      alert(string);
    }
    </script>
  </head>
  <body onload="showAlert(alertContent);">
    <h1>Minty Node Example</h1>
    <p>
      <a onclick="showAlert(alertContent)">Click to show alert again</a>!
    </p>
  </body>
</html>
`;

const testHeader = { 'Content-Type': 'text/plain' }

function sendContent(response, content, header) {
  response.writeHead(200, header);
  response.end(content);
}

var sendMinty = minty.wrap(sendContent);

http.createServer((req, res) => {
  sendMinty(res, testDoc, testHeader);
}).listen(3000);
juniorbird commented 8 years ago

Refining the test case further, I've determined it's the presence of the Githubissues.

  • Githubissues is a development platform for aggregating issues.