Skip to content

Commit

Permalink
test(service): Test configured path is absolute and exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jezhiggins committed May 29, 2020
1 parent 249053f commit f769d6c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/boot-service-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,18 @@ describe('Boot localstorage service', () => {
expect(onBoot).to.throw(/could not configure/i)
})

it ('fail if configure path is not absolute', () => {
options.config.localstorage.rootPath = 'relative/path'

expect(onBoot).to.throw(/must be absolute/i)
})

it ('fail if configure path does not exist', () => {
options.config.localstorage.rootPath = '/a/path/to/nowhere'

expect(onBoot).to.throw(/must be exist/i)
})

it ("don't register if config is missing", () => {
delete options.config.localstorage

Expand Down

0 comments on commit f769d6c

Please sign in to comment.