diff --git a/benchmark/server b/benchmark/server deleted file mode 100755 index 253103a..0000000 --- a/benchmark/server +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node - -"use strict"; - -/* eslint-env node */ - -// Small server whose main purpose is to ensure that both the benchmarked code -// and the benchmark get passed through Babel & Browserify before they are -// served to the browser. - -let babelify = require("babelify"); -let browserify = require("browserify"); -let express = require("express"); -let glob = require("glob"); -let logger = require("morgan"); - -let app = express(); - -app.use(logger("dev")); -app.use(express.static(__dirname)); -app.use("/examples", express.static(`${__dirname}/../examples`)); - -app.get("/bundle.js", (req, res) => { - let files = glob.sync(`${__dirname}/**/*.js`, { - ignore: `${__dirname}/vendor/**/*` - }); - - browserify(files) - .transform(babelify, { presets: "es2015", compact: false }) - .bundle() - .pipe(res); -}); - -app.listen(8000, () => { - console.log("Benchmark server running at http://localhost:8000..."); -}); diff --git a/gulpfile.js b/gulpfile.js index 8a3e2fe..03c9ee9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -32,20 +32,16 @@ const HEADER = [ const JS_FILES = [ "lib/**/*.js", "!lib/parser.js", - "test/**/*.js", - "test/server", - "!test/vendor/**/*", - "benchmark/**/*.js", - "benchmark/run", - "benchmark/server", - "!benchmark/vendor/**/*", + "test/benchmark/**/*.js", + "test/benchmark/run", + "test/spec/**/*.js", + "test/server/run", "bin/*.js", "gulpfile.js" ]; const TEST_FILES = [ - "test/**/*.js", - "!test/vendor/**/*" + "test/spec/**/*.js" ]; function generate(contents) { @@ -71,7 +67,7 @@ gulp.task("test", () => // Run benchmarks. gulp.task("benchmark", () => - spawn("node", ["benchmark/run"], { stdio: "inherit" }) + spawn("node", ["test/benchmark/run"], { stdio: "inherit" }) ); // Create the browser build. diff --git a/package.json b/package.json index 62cb56b..4c22f18 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "lint": "gulp lint", "spec": "gulp test", "test": "gulp", + "test:server": "node test/server/run", "benchmark": "gulp benchmark", "browser:build": "gulp browser:build", "browser:clean": "gulp browser:build", diff --git a/benchmark/README.md b/test/benchmark/README.md similarity index 100% rename from benchmark/README.md rename to test/benchmark/README.md diff --git a/benchmark/benchmarks.js b/test/benchmark/benchmarks.js similarity index 100% rename from benchmark/benchmarks.js rename to test/benchmark/benchmarks.js diff --git a/benchmark/css/960.gs/min/960.css b/test/benchmark/css/960.gs/min/960.css similarity index 100% rename from benchmark/css/960.gs/min/960.css rename to test/benchmark/css/960.gs/min/960.css diff --git a/benchmark/css/960.gs/min/960_24_col.css b/test/benchmark/css/960.gs/min/960_24_col.css similarity index 100% rename from benchmark/css/960.gs/min/960_24_col.css rename to test/benchmark/css/960.gs/min/960_24_col.css diff --git a/benchmark/css/960.gs/min/reset.css b/test/benchmark/css/960.gs/min/reset.css similarity index 100% rename from benchmark/css/960.gs/min/reset.css rename to test/benchmark/css/960.gs/min/reset.css diff --git a/benchmark/css/960.gs/min/text.css b/test/benchmark/css/960.gs/min/text.css similarity index 100% rename from benchmark/css/960.gs/min/text.css rename to test/benchmark/css/960.gs/min/text.css diff --git a/benchmark/css/960.gs/src/960.css b/test/benchmark/css/960.gs/src/960.css similarity index 100% rename from benchmark/css/960.gs/src/960.css rename to test/benchmark/css/960.gs/src/960.css diff --git a/benchmark/css/960.gs/src/960_24_col.css b/test/benchmark/css/960.gs/src/960_24_col.css similarity index 100% rename from benchmark/css/960.gs/src/960_24_col.css rename to test/benchmark/css/960.gs/src/960_24_col.css diff --git a/benchmark/css/960.gs/src/reset.css b/test/benchmark/css/960.gs/src/reset.css similarity index 100% rename from benchmark/css/960.gs/src/reset.css rename to test/benchmark/css/960.gs/src/reset.css diff --git a/benchmark/css/960.gs/src/text.css b/test/benchmark/css/960.gs/src/text.css similarity index 100% rename from benchmark/css/960.gs/src/text.css rename to test/benchmark/css/960.gs/src/text.css diff --git a/benchmark/css/blueprint/min/ie.css b/test/benchmark/css/blueprint/min/ie.css similarity index 100% rename from benchmark/css/blueprint/min/ie.css rename to test/benchmark/css/blueprint/min/ie.css diff --git a/benchmark/css/blueprint/min/print.css b/test/benchmark/css/blueprint/min/print.css similarity index 100% rename from benchmark/css/blueprint/min/print.css rename to test/benchmark/css/blueprint/min/print.css diff --git a/benchmark/css/blueprint/min/screen.css b/test/benchmark/css/blueprint/min/screen.css similarity index 100% rename from benchmark/css/blueprint/min/screen.css rename to test/benchmark/css/blueprint/min/screen.css diff --git a/benchmark/css/blueprint/src/forms.css b/test/benchmark/css/blueprint/src/forms.css similarity index 100% rename from benchmark/css/blueprint/src/forms.css rename to test/benchmark/css/blueprint/src/forms.css diff --git a/benchmark/css/blueprint/src/grid.css b/test/benchmark/css/blueprint/src/grid.css similarity index 100% rename from benchmark/css/blueprint/src/grid.css rename to test/benchmark/css/blueprint/src/grid.css diff --git a/benchmark/css/blueprint/src/ie.css b/test/benchmark/css/blueprint/src/ie.css similarity index 100% rename from benchmark/css/blueprint/src/ie.css rename to test/benchmark/css/blueprint/src/ie.css diff --git a/benchmark/css/blueprint/src/print.css b/test/benchmark/css/blueprint/src/print.css similarity index 100% rename from benchmark/css/blueprint/src/print.css rename to test/benchmark/css/blueprint/src/print.css diff --git a/benchmark/css/blueprint/src/reset.css b/test/benchmark/css/blueprint/src/reset.css similarity index 100% rename from benchmark/css/blueprint/src/reset.css rename to test/benchmark/css/blueprint/src/reset.css diff --git a/benchmark/css/blueprint/src/typography.css b/test/benchmark/css/blueprint/src/typography.css similarity index 100% rename from benchmark/css/blueprint/src/typography.css rename to test/benchmark/css/blueprint/src/typography.css diff --git a/benchmark/index.js b/test/benchmark/index.js similarity index 90% rename from benchmark/index.js rename to test/benchmark/index.js index 190d95a..57fd4aa 100644 --- a/benchmark/index.js +++ b/test/benchmark/index.js @@ -10,12 +10,6 @@ $("#run").click(() => { let resultsTable = $("#results-table"); - function appendHeading(heading) { - resultsTable.append( - "