Kill old icons logic

This commit is contained in:
dannyrb committed 2019-05-28 14:50:22 -04:00
1 parent 97899570ae
commit ac44228b94
4 files changed
+18 -50

No files matched your search

+1 -18
View File
@@ -2,25 +2,8 @@ import getDefaultToolbarButtons from './getDefaultToolbarButtons.js'
describe('getDefaultToolbarButtons.js', () => {
it('returns a non-empty array', () => {
const basePath = '/'
const buttons = getDefaultToolbarButtons(basePath)
const buttons = getDefaultToolbarButtons()
expect(buttons.length).toBeGreaterThan(0)
})
it('uses the provided basePath in buttons with an svgUrl property', () => {
const basePath = '/demo/'
const buttons = getDefaultToolbarButtons(basePath)
const hasOneOrMoreButtonsWithSvgUrlProperty = buttons.some(btn =>
btn.hasOwnProperty('svgUrl')
)
const usesBasePathInButtonSvgUrls = buttons.every(
btn => !btn.hasOwnProperty('svgUrl') || btn.svgUrl.includes(basePath)
)
expect(hasOneOrMoreButtonsWithSvgUrlProperty).toBeTruthy()
expect(usesBasePathInButtonSvgUrls).toBeTruthy()
})
})