File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ import * as test from 'tape' ;
2+ import { lookup } from '../src/mime-types' ;
3+
4+ test ( 'lookup .js' , t => {
5+ t . plan ( 1 ) ;
6+ const mime = lookup ( 'file.js' ) ;
7+ t . equal ( mime , 'application/javascript' ) ;
8+ } ) ;
9+
10+ test ( 'lookup .js.map' , t => {
11+ t . plan ( 1 ) ;
12+ const mime = lookup ( 'file.js.map' ) ;
13+ t . equal ( mime , 'application/javascript' ) ;
14+ } ) ;
15+
16+ test ( 'lookup .json' , t => {
17+ t . plan ( 1 ) ;
18+ const mime = lookup ( 'file.json' ) ;
19+ t . equal ( mime , 'application/json' ) ;
20+ } ) ;
21+
22+ test ( 'lookup .css' , t => {
23+ t . plan ( 1 ) ;
24+ const mime = lookup ( 'file.css' ) ;
25+ t . equal ( mime , 'text/css' ) ;
26+ } ) ;
27+
28+ test ( 'lookup .html' , t => {
29+ t . plan ( 1 ) ;
30+ const mime = lookup ( 'file.html' ) ;
31+ t . equal ( mime , 'text/html' ) ;
32+ } ) ;
33+
34+ test ( 'lookup .txt' , t => {
35+ t . plan ( 1 ) ;
36+ const mime = lookup ( '/some/file.txt' ) ;
37+ t . equal ( mime , 'text/plain' ) ;
38+ } ) ;
You can’t perform that action at this time.
0 commit comments