Skip to content

Commit 7263476

Browse files
James TsaiJames Tsai
authored andcommitted
fix: fix config test case of default hackmdAPIEndpointURL value
1 parent 5576e1f commit 7263476

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/config.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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(/Could not read JSON config file at/)
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(/Please specify HackMD API endpoint URL either/)
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 () {

0 commit comments

Comments
 (0)