1- var assert = require ( 'assert' )
2- var jsdom = require ( 'jsdom' )
3- var sinon = require ( 'sinon' )
4- var texme = require ( '../texme.js' )
1+ const assert = require ( 'assert' )
2+ const jsdom = require ( 'jsdom' )
3+ const sinon = require ( 'sinon' )
4+ const texme = require ( '../texme.js' )
55
66describe ( 'renderPage' , function ( ) {
77 before ( function ( ) {
@@ -10,7 +10,7 @@ describe('renderPage', function () {
1010 } )
1111
1212 it ( 'content in textarea' , function ( ) {
13- var html = '<textarea>Foo'
13+ const html = '<textarea>Foo'
1414
1515 global . window = new jsdom . JSDOM ( html ) . window
1616 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -23,7 +23,7 @@ describe('renderPage', function () {
2323 } )
2424
2525 it ( 'content in body' , function ( ) {
26- var html = 'Foo'
26+ const html = 'Foo'
2727
2828 global . window = new jsdom . JSDOM ( html ) . window
2929 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -36,8 +36,8 @@ describe('renderPage', function () {
3636 } )
3737
3838 it ( 'mathjax typeset' , function ( ) {
39- var html = '<!DOCTYPE html><textarea>Foo'
40- var fakeTypesetFunction = sinon . fake ( )
39+ const html = '<!DOCTYPE html><textarea>Foo'
40+ const fakeTypesetFunction = sinon . fake ( )
4141
4242 global . window = new jsdom . JSDOM ( html ) . window
4343 global . window . MathJax = { typeset : fakeTypesetFunction }
@@ -49,7 +49,7 @@ describe('renderPage', function () {
4949 } )
5050
5151 it ( 'implicit title from content' , function ( ) {
52- var html = '<!DOCTYPE html><textarea>Foo\nBar\nBaz'
52+ const html = '<!DOCTYPE html><textarea>Foo\nBar\nBaz'
5353
5454 global . window = new jsdom . JSDOM ( html ) . window
5555 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -61,7 +61,7 @@ describe('renderPage', function () {
6161 } )
6262
6363 it ( 'remove leading and trailing spaces in implicit title' , function ( ) {
64- var html = '<!DOCTYPE html><textarea> \n \tFoo\t \nBar\nBaz'
64+ const html = '<!DOCTYPE html><textarea> \n \tFoo\t \nBar\nBaz'
6565
6666 global . window = new jsdom . JSDOM ( html ) . window
6767 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -73,7 +73,7 @@ describe('renderPage', function () {
7373 } )
7474
7575 it ( 'remove leading and trailing hashes in implicit title' , function ( ) {
76- var html = '<!DOCTYPE html><textarea>### Foo ###\nBar\nBaz'
76+ const html = '<!DOCTYPE html><textarea>### Foo ###\nBar\nBaz'
7777
7878 global . window = new jsdom . JSDOM ( html ) . window
7979 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -85,7 +85,7 @@ describe('renderPage', function () {
8585 } )
8686
8787 it ( 'explicit title intact' , function ( ) {
88- var html = '<!DOCTYPE html><title>Qux</title><textarea>Foo\nBar\nBaz'
88+ const html = '<!DOCTYPE html><title>Qux</title><textarea>Foo\nBar\nBaz'
8989
9090 global . window = new jsdom . JSDOM ( html ) . window
9191 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -97,7 +97,7 @@ describe('renderPage', function () {
9797 } )
9898
9999 it ( 'spaces and hashes intact in explicit title' , function ( ) {
100- var html = '<!DOCTYPE html><title>### Qux ###</title><textarea>Foo'
100+ const html = '<!DOCTYPE html><title>### Qux ###</title><textarea>Foo'
101101
102102 global . window = new jsdom . JSDOM ( html ) . window
103103 global . window . MathJax = { typeset : sinon . fake ( ) }
@@ -109,7 +109,7 @@ describe('renderPage', function () {
109109 } )
110110
111111 it ( 'explicit title intact' , function ( ) {
112- var html = '<!DOCTYPE html><title>Qux</title><textarea>Foo\nBar\nBaz'
112+ const html = '<!DOCTYPE html><title>Qux</title><textarea>Foo\nBar\nBaz'
113113
114114 global . window = new jsdom . JSDOM ( html ) . window
115115 global . window . MathJax = { typeset : sinon . fake ( ) }
0 commit comments