Merge the test suites into the website
parent
4596daae28
commit
5e7134936b
@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PEG.js Benchmark Suite</title>
|
||||
<link rel="stylesheet" href="benchmark.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>PEG.js Benchmark Suite</h1>
|
||||
|
||||
<div id="options">
|
||||
<label for="run-count">Run each test</label>
|
||||
<input type="text" id="run-count" value="10"> times
|
||||
<input type="checkbox" id="cache">
|
||||
<label for="cache">Use results cache</label>
|
||||
<label for="optimize">Optimize:</label>
|
||||
<select id="optimize">
|
||||
<option value="speed">Speed</option>
|
||||
<option value="size">Size</option>
|
||||
</select>
|
||||
<input type="button" id="run" value="Run">
|
||||
</div>
|
||||
|
||||
<table id="results-table">
|
||||
<tr class="columns">
|
||||
<th>Test</th>
|
||||
<th>Input Size</th>
|
||||
<th>Average Parse Time</th>
|
||||
<th>Average Parse Speed</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="no-results" colspan="4">No results available yet.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script src="vendor/jquery/jquery.js"></script>
|
||||
<script src="vendor/jquery.scrollto/jquery.scrollTo.js"></script>
|
||||
<script src="benchmark/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,24 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PEG.js Test Suites</title>
|
||||
<style>
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #1A0BF1;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: #9D0BF1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
<h1>PEG.js Test Suites</h1>
|
||||
</p>
|
||||
• <a href="/benchmark.html">Benchmark Suite</a><br />
|
||||
• <a href="/spec.html">Spec Suite</a>
|
||||
</body>
|
||||
</html>
|
@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
"use strict";
|
||||
|
||||
const babelify = require( "babelify" );
|
||||
const browserify = require( "browserify" );
|
||||
const express = require( "express" );
|
||||
const glob = require( "glob" );
|
||||
const logger = require( "morgan" );
|
||||
|
||||
const app = express();
|
||||
|
||||
app.use( logger( "dev" ) );
|
||||
app.use( express.static( __dirname ) );
|
||||
app.use( "/benchmark", express.static( `${ __dirname }/../benchmark` ) );
|
||||
app.use( "/examples", express.static( `${ __dirname }/../../examples` ) );
|
||||
|
||||
app.get( "/:dir/bundle.js", ( req, res ) => {
|
||||
|
||||
browserify( glob.sync( `${ __dirname }/../${ req.params.dir }/**/*.js` ) )
|
||||
.transform( babelify )
|
||||
.bundle()
|
||||
.pipe( res );
|
||||
|
||||
} );
|
||||
|
||||
app.listen( 8000, () => {
|
||||
|
||||
console.log( "Test server running at: http://localhost:8000/" );
|
||||
|
||||
} );
|
@ -1,19 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>PEG.js Spec Suite</title>
|
||||
<link rel="stylesheet" href="vendor/mocha/mocha.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="mocha"></div>
|
||||
<script src="vendor/mocha/mocha.js"></script>
|
||||
<script>
|
||||
mocha.setup('bdd');
|
||||
</script>
|
||||
<script src="spec/bundle.js"></script>
|
||||
<script>
|
||||
mocha.run();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because one or more lines are too long
@ -1,22 +0,0 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2016 JS Foundation and contributors, https://js.foundation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -0,0 +1,30 @@
|
||||
<link rel="stylesheet" href="/css/benchmark.css">
|
||||
|
||||
<div id="options">
|
||||
<label for="run-count">Run each test</label>
|
||||
<input type="text" id="run-count" value="10"> times
|
||||
<input type="checkbox" id="cache">
|
||||
<label for="cache">Use results cache</label>
|
||||
<label for="optimize">Optimize:</label>
|
||||
<select id="optimize">
|
||||
<option value="speed">Speed</option>
|
||||
<option value="size">Size</option>
|
||||
</select>
|
||||
<input type="button" id="run" value="Run">
|
||||
</div>
|
||||
|
||||
<table id="results-table">
|
||||
<tr class="columns">
|
||||
<th>Test</th>
|
||||
<th>Input Size</th>
|
||||
<th>Average Parse Time</th>
|
||||
<th>Average Parse Speed</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="no-results" colspan="4">No results available yet.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script src="/vendor/jquery/jquery.js"></script>
|
||||
<script src="/vendor/jquery.scrollto/jquery.scrollTo.js"></script>
|
||||
<script src="/benchmark/bundle.js"></script>
|
@ -0,0 +1,16 @@
|
||||
<div id="mocha"></div>
|
||||
|
||||
<link href="/css/spec.css" rel="stylesheet" />
|
||||
<script src="https://unpkg.com/mocha@5.2.0/mocha.js"></script>
|
||||
|
||||
<script>
|
||||
mocha.setup( {
|
||||
ui: "bdd"
|
||||
} );
|
||||
</script>
|
||||
|
||||
<script src="/spec/bundle.js"></script>
|
||||
|
||||
<script>
|
||||
mocha.run();
|
||||
</script>
|
Loading…
Reference in New Issue