Skip to content

Commit

Permalink
Change application/javascript => text/javascript
Browse files Browse the repository at this point in the history
Fixes #223
  • Loading branch information
mjackson committed Oct 7, 2019
1 parent 6f880c6 commit 73f4f83
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/__tests__/regularFile-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('A request for a JavaScript file', () => {
.end((err, res) => {
expect(res.statusCode).toBe(200);
expect(res.headers['content-type']).toMatch(
/\bapplication\/javascript\b/
/\btext\/javascript\b/
);
expect(res.headers['content-type']).toMatch(/\bcharset=utf-8\b/);
done();
Expand All @@ -28,7 +28,7 @@ describe('A request for a JavaScript file', () => {
.end((err, res) => {
expect(res.statusCode).toBe(200);
expect(res.headers['content-type']).toMatch(
/\bapplication\/javascript\b/
/\btext\/javascript\b/
);
expect(res.headers['content-type']).toMatch(/\bcharset=utf-8\b/);
done();
Expand Down
1 change: 1 addition & 0 deletions modules/utils/getContentType.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import mime from 'mime';

mime.define(
{
'text/javascript': ['js', 'mjs'],
'text/plain': [
'authors',
'changes',
Expand Down
1 change: 1 addition & 0 deletions modules/utils/getLanguageName.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const contentTypeNames = {
'font/woff2': 'WOFF2',
'text/css': 'CSS',
'text/html': 'HTML',
'text/javascript': 'JavaScript',
'text/jsx': 'JSX',
'text/markdown': 'Markdown',
'text/plain': 'Plain Text',
Expand Down

0 comments on commit 73f4f83

Please sign in to comment.