Skip to content

Commit 1320389

Browse files
committed
use Array.forEach instead of Array.map where applicable for better performance
1 parent 2f6156d commit 1320389

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

test/requests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ async.each(fixtures.cli, function (cli) {
4848

4949
// make an exception for multipart/form-data
5050
if (fixtures.requests[request].headers) {
51-
fixtures.requests[request].headers.map(function (header, index) {
51+
fixtures.requests[request].headers.forEach(function (header, index) {
5252
if (header.name === 'content-type' && header.value === 'multipart/form-data') {
5353
delete fixtures.requests[request].headers[index]
5454
}

test/targets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ var itShouldGenerateOutput = function (request, path, target, client) {
6666
describe('Available Targets', function () {
6767
var targets = HTTPSnippet.availableTargets()
6868

69-
targets.map(function (target) {
69+
targets.forEach(function (target) {
7070
it('available-targets.json should include ' + target.title, function () {
7171
fixtures['available-targets'].should.containEql(target)
7272
})

0 commit comments

Comments
 (0)