Skip to content

Commit

Permalink
util: remove internal mime fns from benchmarks
Browse files Browse the repository at this point in the history
PR-URL: #50201
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
  • Loading branch information
Uzlopak authored and targos committed Nov 11, 2023
1 parent e49ebf8 commit bf5b211
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 116 deletions.
53 changes: 0 additions & 53 deletions benchmark/mime/parse-type-and-subtype.js

This file was deleted.

54 changes: 0 additions & 54 deletions benchmark/mime/to-ascii-lower.js

This file was deleted.

2 changes: 0 additions & 2 deletions lib/internal/mime.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,6 @@ ObjectDefineProperty(MIMEType.prototype, 'toJSON', {
});

module.exports = {
toASCIILower,
parseTypeAndSubtype,
MIMEParams,
MIMEType,
};
7 changes: 0 additions & 7 deletions test/parallel/test-mime-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
require('../common');
const assert = require('assert');
const { MIMEType, MIMEParams } = require('util');
const { toASCIILower } = require('internal/mime');


const WHITESPACES = '\t\n\f\r ';
const NOT_HTTP_TOKEN_CODE_POINT = ',';
Expand Down Expand Up @@ -160,8 +158,3 @@ assert.throws(() => params.set(`x${NOT_HTTP_TOKEN_CODE_POINT}`, 'x'), /parameter
assert.throws(() => params.set('x', `${NOT_HTTP_QUOTED_STRING_CODE_POINT};`), /parameter value/i);
assert.throws(() => params.set('x', `${NOT_HTTP_QUOTED_STRING_CODE_POINT}x`), /parameter value/i);
assert.throws(() => params.set('x', `x${NOT_HTTP_QUOTED_STRING_CODE_POINT}`), /parameter value/i);

assert.strictEqual(toASCIILower('someThing'), 'something');
assert.strictEqual(toASCIILower('SomeThing'), 'something');
assert.strictEqual(toASCIILower('SomeThing3'), 'something3');
assert.strictEqual(toASCIILower('ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 'abcdefghijklmnopqrstuvwxyz');

0 comments on commit bf5b211

Please sign in to comment.