diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-client/test/fetch-503.js')
-rw-r--r-- | deps/npm/node_modules/npm-registry-client/test/fetch-503.js | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/deps/npm/node_modules/npm-registry-client/test/fetch-503.js b/deps/npm/node_modules/npm-registry-client/test/fetch-503.js index 239e2e7740e..04f5901e8c8 100644 --- a/deps/npm/node_modules/npm-registry-client/test/fetch-503.js +++ b/deps/npm/node_modules/npm-registry-client/test/fetch-503.js @@ -1,29 +1,29 @@ -var resolve = require("path").resolve -var createReadStream = require("graceful-fs").createReadStream -var readFileSync = require("graceful-fs").readFileSync +var resolve = require('path').resolve +var createReadStream = require('graceful-fs').createReadStream +var readFileSync = require('graceful-fs').readFileSync -var tap = require("tap") -var cat = require("concat-stream") +var tap = require('tap') +var cat = require('concat-stream') -var server = require("./lib/server.js") -var common = require("./lib/common.js") +var server = require('./lib/server.js') +var common = require('./lib/common.js') -var tgz = resolve(__dirname, "./fixtures/underscore/1.3.3/package.tgz") +var tgz = resolve(__dirname, './fixtures/underscore/1.3.3/package.tgz') -tap.test("fetch with retry on server error", function (t) { - server.expect("/underscore/-/underscore-1.3.3.tgz", function (req, res) { - t.equal(req.method, "GET", "got expected method") +tap.test('fetch with retry on server error', function (t) { + server.expect('/underscore/-/underscore-1.3.3.tgz', function (req, res) { + t.equal(req.method, 'GET', 'got expected method') res.writeHead(503) res.end() }) - server.expect("/underscore/-/underscore-1.3.3.tgz", function (req, res) { - t.equal(req.method, "GET", "got expected method") + server.expect('/underscore/-/underscore-1.3.3.tgz', function (req, res) { + t.equal(req.method, 'GET', 'got expected method') res.writeHead(200, { - "content-type" : "application/x-tar", - "content-encoding" : "gzip" + 'content-type': 'application/x-tar', + 'content-encoding': 'gzip' }) createReadStream(tgz).pipe(res) @@ -33,18 +33,18 @@ tap.test("fetch with retry on server error", function (t) { var defaulted = {} client.config.retry.minTimeout = 100 client.fetch( - "http://localhost:1337/underscore/-/underscore-1.3.3.tgz", + 'http://localhost:1337/underscore/-/underscore-1.3.3.tgz', defaulted, function (er, res) { - t.ifError(er, "loaded successfully") + t.ifError(er, 'loaded successfully') var sink = cat(function (data) { t.deepEqual(data, readFileSync(tgz)) t.end() }) - res.on("error", function (error) { - t.ifError(error, "no errors on stream") + res.on('error', function (error) { + t.ifError(error, 'no errors on stream') }) res.pipe(sink) |