Index: run_tests.py |
=================================================================== |
--- a/run_tests.py |
+++ b/run_tests.py |
@@ -33,17 +33,17 @@ def multiplex(path=""): |
request_path = request_url.path |
if request_path.startswith("/lib/"): |
path = flask.safe_join(os.path.dirname(__file__), request_path.lstrip("/")) |
if not os.path.isfile(path): |
return flask.abort(404) |
with open(path, "rb") as file: |
module = os.path.splitext(request_path[len("/lib/"):])[0] |
- data = "require.scopes['%s'] = function(){exports={};%s\nreturn exports;}();" % (module, file.read()) |
+ data = "require.scopes['%s'] = function(){var exports={};%s\nreturn exports;}();" % (module, file.read()) |
return (data, 200, {"Content-Type": "application/javascript; charset=utf-8"}) |
else: |
if request_path.endswith("/"): |
request_path += "index.html" |
return flask.send_from_directory(os.path.join(os.path.dirname(__file__), "test"), request_path.lstrip("/")) |
if __name__ == "__main__": |
app.run(debug=True) |