1
0
mirror of https://github.com/thangisme/notes.git synced 2025-11-23 13:12:25 -05:00

Initial commit

This commit is contained in:
Patrick Marsceill
2017-03-09 13:16:08 -05:00
commit b7b0d0d7bf
4147 changed files with 401224 additions and 0 deletions

24
node_modules/normalize-package-data/test/scripts.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
var tap = require("tap")
var normalize = require("../lib/normalize")
var path = require("path")
var fs = require("fs")
tap.test("bad scripts", function (t) {
var p = path.resolve(__dirname, "./fixtures/badscripts.json")
fs.readFile (p, function (err, contents) {
if (err) throw err
var originalData = JSON.parse(contents.toString())
var data = JSON.parse(contents.toString())
normalize(data)
t.ok(data)
verifyFields(t, data, originalData)
t.end()
})
})
function verifyFields (t, normalized, original) {
t.equal(normalized.version, original.version, "Version field stays same")
t.equal(normalized.name, original.name, "Name stays the same.")
// scripts is not an object, so it should be deleted
t.notOk(normalized.scripts)
}