-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Most of the tests now pass in Chrome
- Loading branch information
Showing
5 changed files
with
109 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
/benchmark/node_modules/ | ||
|
||
/.idea/ | ||
/bower_components/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |