Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: remove internal mime fns from benchmarks #50201

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
Loading