all files / tests/specs/slot/ index.spec.js

100% Statements 4/4
100% Branches 0/0
100% Functions 2/2
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11             
import { renderSFCModule } from 'utils';
 
describe('slots', () => {
  it('should render slots and named slots', () => {
    const container = renderSFCModule(require('./parent'));
    expect(container.innerHTML).to.equal(
      '<div><header><h1>这里可能是一个页面标题</h1></header> <main> <p>主要内容的一个段落。</p> <p>另一个主要段落。</p> </main> <footer><p>这里有一些联系信息</p></footer></div>'
    );
  });
});