1 var tap = require("tap")
2 var normalize = require("../lib/normalize")
4 var async = require("async")
9 tap.test("consistent normalization", function(t) {
11 'read-package-json.json',
14 "node-module_exist.json"
16 var verifyConsistency = function(entryName, next) {
17 warn = function(msg) {
18 // t.equal("",msg) // uncomment to have some kind of logging of warnings
20 var filename = __dirname + "/fixtures/" + entryName
21 fs.readFile(filename, function(err, contents) {
22 if (err) return next(err)
23 data = JSON.parse(contents.toString())
25 if(data.name == "node-module_exist") {
26 t.same(data.bugs.url, "https://gist.github.com/3135914")
28 if(data.name == "read-package-json") {
29 t.same(data.bugs.url, "https://github.com/isaacs/read-package-json/issues")
31 if(data.name == "http-server") {
32 t.same(data.bugs.url, "https://github.com/nodejitsu/http-server/issues")
34 if(data.name == "movefile") {
35 t.same(data.bugs.url, "https://github.com/yazgazan/movefile/issues")
39 } // verifyConsistency
40 async.forEach(entries, verifyConsistency, function(err) {