index.test.js 361 B

1234567891011121314
  1. const pug = require('../../');
  2. test('layout with duplicate block', () => {
  3. const outputWithAjax = pug.renderFile(
  4. __dirname + '/index.pug',
  5. {ajax: true}
  6. );
  7. const outputWithoutAjax = pug.renderFile(
  8. __dirname + '/index.pug',
  9. {ajax: false}
  10. );
  11. expect(outputWithAjax).toMatchSnapshot();
  12. expect(outputWithoutAjax).toMatchSnapshot();
  13. });