Skip to content
Open
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
9 changes: 8 additions & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ describe('utils.normalizeType acceptParams method', () => {
params: {} // No parameters are added since "invalid" has no "="
});
});
});

it('should default to application/octet-stream when mime lookup fails', () => {
const result = utils.normalizeType('unknown-extension-xyz');
assert.deepEqual(result, {
value: 'application/octet-stream',
params: {}
});
});
});

describe('utils.setCharset(type, charset)', function () {
it('should do anything without type', function () {
Expand Down