File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 "coffee-script" : " 1.2" ,
2020 "mocha" : " 1.7.4"
2121 },
22- "chromium-args" : " disable-javascript-i18n-api"
22+ "chromium-args" : " disable-javascript-i18n-api" ,
23+ "user-agent" : " %name/%nwver/%ver/%webkit_ver/%osinfo"
2324}
Original file line number Diff line number Diff line change 1+ var assert = require ( 'assert' ) ;
2+ var fs = require ( 'fs' ) ;
3+ describe ( 'user-agent' , function ( ) {
4+ var user_agent = navigator . userAgent . split ( '/' ) ;
5+ var package_info = JSON . parse ( fs . readFileSync ( 'package.json' , 'utf8' ) ) ;
6+ it ( 'name should be same to the one in package.json' ,
7+ function ( ) {
8+ assert . equal ( user_agent [ 0 ] , package_info . name ) ;
9+ }
10+ )
11+
12+ it ( 'version should be same to the one in package.json' ,
13+ function ( ) {
14+ assert . equal ( user_agent [ 2 ] , package_info . version ) ;
15+ }
16+ )
17+ } )
You can’t perform that action at this time.
0 commit comments