File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ describe('Config test', function () {
2626 this . configFilePath = setupConfigFile ( )
2727 } )
2828
29- it . skip ( 'should throw no config error if config.json not found and no hackmdEndpointURL set in env' , function ( ) {
29+ it . skip ( 'should throw no config error if config.json not found and no hackmdAPIEndpointURL set in env' , function ( ) {
3030 expect ( requireConfig )
3131 . to . throw ( new RegExp ( `Configuration file at ${ this . configFilePath } not readable` ) )
3232 } )
@@ -38,11 +38,11 @@ describe('Config test', function () {
3838 . to . throw ( / C o u l d n o t r e a d J S O N c o n f i g f i l e a t / )
3939 } )
4040
41- it . skip ( 'should throw error if no hackmdEndpointURL is set ' , function ( ) {
41+ it ( 'should set hackmdAPIEndpointURL to defalut value: https://api.hackmd.io/v1 if no value is given ' , function ( ) {
4242 fs . writeFileSync ( this . configFilePath , '{}' , 'utf8' )
4343
44- expect ( requireConfig )
45- . to . throw ( / P l e a s e s p e c i f y H a c k M D A P I e n d p o i n t U R L e i t h e r / )
44+ const config = requireConfig ( )
45+ expect ( config . hackmdAPIEndpointURL ) . to . eq ( 'https://api.hackmd.io/v1' )
4646 } )
4747
4848 it . skip ( 'should throw error if no access token is set' , function ( ) {
You can’t perform that action at this time.
0 commit comments