Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
markfinger committed Jul 8, 2016
1 parent 5013a31 commit 98917bf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion persistent_cache/cache_key.js → utils/hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ const {isArray, isString} = require('lodash/lang');
const Murmur = require('imurmurhash');

module.exports = {
generateCacheKey
generateCacheKey,
stringToMurmur
};

function generateCacheKey(data) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
"use strict";

const {assert} = require('../../utils/assert');
const {generateCacheKey} = require('../cache_key');
const {assert} = require('../assert');
const {stringToMurmur, generateCacheKey} = require('../hash');

describe('persistent_cache/cache_key', () => {
describe('utils/hash', () => {
describe('#stringToMurmur', () => {
it('should return the expected murmur hash as a string', () => {
assert.equal(stringToMurmur('test'), '3127628307');
});
});
describe('#generateCacheKey', () => {
it('should accept a string and produce a hash', () => {
assert.equal(
Expand Down

0 comments on commit 98917bf

Please sign in to comment.