Use text/plain for PATENTS file

This commit is contained in:
MICHAEL JACKSON 2017-08-18 16:47:52 -07:00
parent 6b482f1099
commit f87f0962f4
2 changed files with 8 additions and 6 deletions

View File

@ -2,11 +2,12 @@ const mime = require('mime')
mime.define({ mime.define({
'text/plain': [ 'text/plain': [
'license',
'readme',
'changes',
'authors', 'authors',
'changes',
'license',
'makefile', 'makefile',
'patents',
'readme',
'ts', 'ts',
'flow' 'flow'
] ]

View File

@ -1,11 +1,12 @@
const getFileContentType = require('./getFileContentType') const getFileContentType = require('./getFileContentType')
it('gets a content type of text/plain for LICENSE|README|CHANGES|AUTHORS|Makefile', () => { it('gets a content type of text/plain for LICENSE|README|CHANGES|AUTHORS|Makefile', () => {
expect(getFileContentType('LICENSE')).toBe('text/plain')
expect(getFileContentType('README')).toBe('text/plain')
expect(getFileContentType('CHANGES')).toBe('text/plain')
expect(getFileContentType('AUTHORS')).toBe('text/plain') expect(getFileContentType('AUTHORS')).toBe('text/plain')
expect(getFileContentType('CHANGES')).toBe('text/plain')
expect(getFileContentType('LICENSE')).toBe('text/plain')
expect(getFileContentType('Makefile')).toBe('text/plain') expect(getFileContentType('Makefile')).toBe('text/plain')
expect(getFileContentType('PATENTS')).toBe('text/plain')
expect(getFileContentType('README')).toBe('text/plain')
}) })
it('gets a content type of text/plain for .*rc files', () => { it('gets a content type of text/plain for .*rc files', () => {