fquery-gethash
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "fquery-gethash", | ||
"displayName": "fQuery.getHash", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "fQuery plugin to get the hash of a file's content", | ||
@@ -16,6 +16,10 @@ "homepage": "https://github.com/lrsjng/fquery-gethash", | ||
"scripts": { | ||
"test": "mocha test.js" | ||
"test": "node_modules/.bin/mocha test.js" | ||
}, | ||
"dependencies": { | ||
}, | ||
"devDependencies": { | ||
"fquery": "~0.12.2", | ||
"mocha": "~1.21.0" | ||
}, | ||
"engines": { | ||
@@ -22,0 +26,0 @@ "node": ">=0.10" |
27
test.js
@@ -6,29 +6,14 @@ /*jshint node: true */ | ||
var assert = require('assert'), | ||
_ = require('underscore'), | ||
fQuery = require('fquery'), | ||
gethash = require('./'); | ||
fQuery = require('fquery'); | ||
fQuery.plugin(gethash); | ||
describe('fQuery.fn.getHash()', function () { | ||
before(function () { | ||
describe('fQuery.fn.getHash()', function () { | ||
fQuery.plugin(require('./')); | ||
}); | ||
beforeEach(function () { | ||
this.fquery1 = fQuery([ | ||
fQuery.Blob.virtual('#1', 'a'), | ||
fQuery.Blob.virtual('#2', 'b'), | ||
fQuery.Blob.virtual('#3', 'c') | ||
]); | ||
this.fquery2 = fQuery([ | ||
fQuery.Blob.virtual('#1', 'xaxax'), | ||
fQuery.Blob.virtual('#2', 'xbxbx'), | ||
fQuery.Blob.virtual('#3', 'xcxcx') | ||
]); | ||
this.fquery3 = fQuery([ | ||
fQuery.Blob.virtual('#1', '_a_b_c_') | ||
]); | ||
}); | ||
@@ -38,3 +23,3 @@ | ||
assert.ok(_.isFunction(fQuery.fn.getHash)); | ||
assert.ok(fQuery._.isFunction(fQuery.fn.getHash)); | ||
}); | ||
@@ -41,0 +26,0 @@ |
6
3985
2
38