useBr.js 725 B

123456789101112131415161718192021222324252627282930
  1. 'use strict';
  2. let utility = require('../utility');
  3. describe('use br', function() {
  4. before(function() {
  5. const filename = utility.buildPath('fixtures', 'expect', 'useBr.txt'),
  6. testHTML = document.querySelectorAll('#use-br .hljs');
  7. return utility.setupFile(filename, 'utf-8', this, testHTML);
  8. });
  9. it('should respect <br> tags', function() {
  10. const actual = this.blocks[0];
  11. actual.should.equal(this.expected);
  12. });
  13. it('should ignore literal new lines', function() {
  14. const actual = this.blocks[1];
  15. actual.should.equal(this.expected);
  16. });
  17. it('should recognize xml-style <br/>', function() {
  18. const actual = this.blocks[2];
  19. actual.should.equal(this.expected);
  20. });
  21. });