File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change 1414 "author" : " Andreas Hocevar" ,
1515 "license" : " BSD-2-Clause" ,
1616 "scripts" : {
17+ "karma" : " karma start test/karma.conf.js" ,
1718 "lint" : " eslint *.js"
1819 },
1920 "devDependencies" : {
2021 "eslint" : " ^5.15.0" ,
21- "eslint-config-openlayers" : " ^11.0.0"
22+ "eslint-config-openlayers" : " ^11.0.0" ,
23+ "karma" : " ^4.0.1" ,
24+ "karma-chrome-launcher" : " ^2.2.0" ,
25+ "karma-mocha" : " ^1.3.0" ,
26+ "karma-webpack" : " ^3.0.5" ,
27+ "mocha" : " ^6.0.2" ,
28+ "puppeteer" : " ^1.13.0" ,
29+ "should" : " ^13.2.3" ,
30+ "sinon" : " ^7.2.7" ,
31+ "webpack" : " ^4.29.6"
2232 }
2333}
Original file line number Diff line number Diff line change 1+ import should from 'should' ;
2+ import parseFont from '../index' ;
3+
4+ describe ( 'mapbox-to-css-font' , function ( ) {
5+
6+ describe ( 'parseFont' , function ( ) {
7+ it ( 'handle font-weight' , function ( ) {
8+ should ( parseFont ( 'Noto Sans' , 16 ) ) . eql ( 'normal 400 16px "Noto Sans"' ) ;
9+ should ( parseFont ( 'Noto Sans Bold' , 16 ) ) . eql ( 'normal 700 16px "Noto Sans"' ) ;
10+ should ( parseFont ( 'Noto Sans SemiBold Italic' , 16 ) ) . eql ( 'italic 600 16px "Noto Sans"' ) ;
11+ } ) ;
12+ } ) ;
13+
14+ } ) ;
Original file line number Diff line number Diff line change 1+ const path = require ( 'path' ) ;
2+
3+ module . exports = function ( karma ) {
4+ karma . set ( {
5+ frameworks : [ 'mocha' ] ,
6+ files : [ {
7+ pattern : path . resolve ( __dirname , './index.test.js' )
8+ } ] ,
9+ preprocessors : {
10+ '**/*.js' : [ 'webpack' ]
11+ } ,
12+ webpack : {
13+ mode : 'development'
14+ } ,
15+ browsers : [ 'ChromeHeadless' ]
16+ } ) ;
17+ } ;
You can’t perform that action at this time.
0 commit comments