From: Volker Mische Date: Sun, 21 Jan 2018 00:54:18 +0000 (+0100) Subject: Remove some post-processing from download script X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=06aab7e00ef64ae2e2ca069a8c43033e2fd0c389;p=buffer.git Remove some post-processing from download script Some post-processing of the downloaded tests is no longer needed. Use `const` and `let` instead of `var` and also import a trimmed down version of the `common` test helper. --- diff --git a/bin/download-node-tests.js b/bin/download-node-tests.js index ae542c8..464bb47 100755 --- a/bin/download-node-tests.js +++ b/bin/download-node-tests.js @@ -71,15 +71,6 @@ function testfixer (filename) { firstline = false } - // use `var` instead of `const`/`let` - line = line.replace(/(const|let) /g, 'var ') - - // make `var common = require('common')` work - line = line.replace(/(var common = require.*)/g, 'var common = { skip: function () {} };') - - // make `require('../common')` work - line = line.replace(/require\('\.\.\/common'\);/g, '') - // require browser buffer line = line.replace(/(.*)require\('buffer'\)(.*)/g, '$1require(\'../../\')$2')