const date = require('../../../src/website/theme-base/helpers/relative') const handlebars = require('handlebars') const should = require('should/as-function') describe('Handlebars helpers: relative', () => { handlebars.registerHelper('relative', date) it('returns a path in the same folder', () => { const template = handlebars.compile(``) const res = template({ album: { path: 'index.html' } }) should(res).eql('') }) it('returns a relative path for albums in nested folders', () => { const template = handlebars.compile(``) const res = template({ album: { path: 'albums/holidays.html' } }) should(res).eql('') }) })