Skip to content

Commit

Permalink
gzipped files should have .gz as the extension, not .gzip (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornstar authored and hiroppy committed Nov 7, 2016
1 parent 4eace42 commit f86507f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/fs-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const filename = function(source, identifier, options) {

hash.end(contents);

return hash.read().toString("hex") + ".json.gzip";
return hash.read().toString("hex") + ".json.gz";
};

/**
Expand Down
4 changes: 2 additions & 2 deletions test/cache.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test.cb("should output files to cache directory", (t) => {
});
});

test.cb.serial("should output files to standard cache dir by default", (t) => {
test.cb.serial("should output <hash>.json.gz files to standard cache dir by default", (t) => {
const config = assign({}, globalConfig, {
output: {
path: t.context.directory,
Expand All @@ -102,7 +102,7 @@ test.cb.serial("should output files to standard cache dir by default", (t) => {
t.is(err, null);

fs.readdir(defaultCacheDir, (err, files) => {
files = files.filter((file) => /\b[0-9a-f]{5,40}\.json\.gzip\b/.test(file));
files = files.filter((file) => /\b[0-9a-f]{5,40}\.json\.gz\b/.test(file));

t.is(err, null);
t.true(files.length > 0);
Expand Down

0 comments on commit f86507f

Please sign in to comment.