Skip to content

Commit

Permalink
Most of the tests now pass in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
zaggino committed Feb 27, 2014
1 parent 48c8119 commit acc57eb
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/benchmark/node_modules/

/.idea/
/bower_components/
20 changes: 20 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "z-schema",
"version": "2.5.0",
"private": true,
"description": "JSON Schema validator",
"homepage": "https://github.com/zaggino/z-schema",
"keywords": [
"json",
"schema",
"validator"
],
"license": "MIT",
"authors": [
"Martin Zagora <zaggino@gmail.com>"
],
"main": "build/ZSchema.js",
"dependencies": {
"bluebird": "~1.0.7"
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "z-schema",
"version": "2.5.0",
"description": "JSON schema validator",
"homepage": "https://github.com/zaggino/z-schema",
"keywords": [
Expand Down Expand Up @@ -40,7 +41,6 @@
"LICENSE",
"README.md"
],
"version": "2.4.6",
"dependencies": {
"bluebird": "~1.0.5",
"request": "~2.34.0",
Expand All @@ -50,6 +50,8 @@
"random-seed": "~0.1.0"
},
"devDependencies": {
"es5-shim": "latest",
"express": "latest",
"chai": "latest",
"grunt": "~0.4.2",
"grunt-contrib-uglify": "latest",
Expand Down
77 changes: 77 additions & 0 deletions testling.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>z-schema tests</title>
<!-- z-schema stuff -->
<script src="node_modules/es5-shim/es5-shim.js"></script>
<script src="bower_components/bluebird/js/browser/bluebird.js"></script>
<script src="build/ZSchema.js"></script>
<!-- test stuff -->
<!-- note that chai uses Object.create() so needs es5-sham to be loaded -->
<script src="node_modules/es5-shim/es5-sham.js"></script>
<script src="node_modules/mocha/mocha.js"></script>
<script src="node_modules/chai/chai.js"></script>
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
window.__dirname = "test";
window.require = function (str) {
var map = {
"../src/ZSchema": ZSchema,
"chai": chai,
"fs": {
readFileSync: function (uri) {
var response = $.ajax({
async: false,
url: uri
});
return response.responseText;
}
}
}
if (map[str]) { return map[str]; }
};
mocha.setup({
ui:'bdd',
reporter:'tap'
});
chai.Assertion.includeStack = true;
</script>
<!-- tests -->
<script src="test/any.js"></script>
<script src="test/api.js"></script>
<script src="test/arrays.js"></script>
<script src="test/core.js"></script>
<script src="test/customFormats.js"></script>
<script src="test/customModes.js"></script>
<script src="test/issue_9.js"></script>
<script src="test/issue_12.js"></script>
<script src="test/issue_13.js"></script>
<script src="test/issue_16.js"></script>
<script src="test/issue_19.js"></script>
<script src="test/issue_20.js"></script>
<script src="test/issue_21.js"></script>
<script src="test/issue_22.js"></script>
<script src="test/issue_23.js"></script>
<script src="test/issue_25.js"></script>
<script src="test/issue_26.js"></script>
<!--
<script src="test/json_schema.js"></script>
<script src="test/json_schema_sync.js"></script>
-->
<script src="test/numeric.js"></script>
<script src="test/objects.js"></script>
<script src="test/reference.js"></script>
<!--
<script src="test/schemaFactory.js"></script>
-->
<script src="test/strings.js"></script>
<!-- run mocha -->
<script>
mocha.run();
</script>
</head>
<body>
<div id="mocha"></div>
</body>
</html>
8 changes: 8 additions & 0 deletions testlingServer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
var express = require("express");
var app = express();

app.use(express.static(__dirname));

var port = process.env.PORT || 3000;
app.listen(port);
console.log("Listening at 127.0.0.1:" + port);

0 comments on commit acc57eb

Please sign in to comment.