Files
hammond/ui/generators/new/layout/unit.ejs.t
Akhil Gupta d25c30a7b2 first commit
2021-05-29 15:20:50 +05:30

20 lines
536 B
Perl

---
to: "src/router/layouts/<%= h.changeCase.kebab(name) %>.unit.js"
---
<%
const fileName = h.changeCase.kebab(name)
const importName = h.changeCase.pascal(fileName) + 'Layout'
%>import <%= importName %> from './<%= fileName %>'
describe('@layouts/<%= fileName %>', () => {
it('renders its content', () => {
const slotContent = '<p>Hello!</p>'
const { element } = shallowMount(<%= importName %>, {
slots: {
default: slotContent,
},
})
expect(element.innerHTML).toContain(slotContent)
})
})