diff --git a/cli.js b/cli.js index bccbf7b..e3c2596 100755 --- a/cli.js +++ b/cli.js @@ -72,7 +72,8 @@ function setDefaults(cli, configFileFlags) { compositeFlags.runtimeCaching = compositeFlags.runtimeCaching || configFileFlags.runtimeCaching; - compositeFlags.maximumFileSizeToCacheInBytes = compositeFlags.maximumFileSizeToCacheInBytes || + compositeFlags.maximumFileSizeToCacheInBytes = + compositeFlags.maximumFileSizeToCacheInBytes || configFileFlags.maximumFileSizeToCacheInBytes; return compositeFlags; diff --git a/lib/sw-precache.js b/lib/sw-precache.js index 9dd9aa1..85ea34c 100644 --- a/lib/sw-precache.js +++ b/lib/sw-precache.js @@ -152,7 +152,8 @@ function generate(params, callback) { // Strip the prefix to turn this into a relative URL. var relativeUrl = fileAndSizeAndHash.file .replace( - new RegExp('^(' + Object.keys(params.stripPrefixMulti).map(escapeRegExp).join('|') + ')'), + new RegExp('^(' + Object.keys(params.stripPrefixMulti) + .map(escapeRegExp).join('|') + ')'), function(match) { return params.stripPrefixMulti[match]; }) diff --git a/test/test.js b/test/test.js index 1344a96..af060c2 100644 --- a/test/test.js +++ b/test/test.js @@ -17,10 +17,13 @@ // This is a test and we want descriptions to be useful, if this // breaks the max-length, it's ok. - /* eslint-disable max-len */ +/* eslint-disable max-len */ /* eslint-env node, mocha */ 'use strict'; +// Extra interfaces, like generateRuntimeCaching, are exposed while testing. +process.env.NODE_ENV = 'swprecache-test'; + var assert = require('assert'); var externalFunctions = require('../lib/functions.js'); var fs = require('fs');