Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
likr committed Aug 1, 2014
1 parent 069b39b commit 24abd7b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Gruntfile.js
Expand Up @@ -55,6 +55,13 @@ module.exports = function(grunt) {
outputDirectory: 'tmp',
engine: 'lualatex'
}
},
bib: {
src: [ 'tmp/document.aux' ],
options: {
engine: 'bibtex',
interaction: false
}
}
},

Expand Down
5 changes: 5 additions & 0 deletions test/document.tex
Expand Up @@ -15,6 +15,8 @@
\section{Introduction}
Here is some introductory copy.

This is a reference\cite{Flanagan2011}.

\begin{equation}
\label{simple_equation}
\alpha = \sqrt{ \beta }
Expand All @@ -33,4 +35,7 @@ \subsection{Subsection Heading Here}
\section{Conclusion}
Write your conclusion here.

\bibliographystyle{abbrv}
\bibliography{../test/refs}

\end{document}
5 changes: 5 additions & 0 deletions test/latex_test.js
Expand Up @@ -58,6 +58,11 @@ exports.latex = {
var pdfExists = fs.existsSync( 'tmp/lualatex.pdf' );
test.equal(pdfExists, true, 'PDF file has been created using Lualatex');

test.done();
},
bib: function(test) {
var bblExists = fs.existsSync( 'tmp/document.bbl' );
test.equal(bblExists, true, 'bibtex run successfully');
test.done();
}
};
7 changes: 7 additions & 0 deletions test/refs.bib
@@ -0,0 +1,7 @@
@book {
Flanagan2011,
author="David Flanagan",
title="JavaScript: The Definitive Guide, 6th Edition",
publisher="O'Reilly Media",
year="2011"
}

0 comments on commit 24abd7b

Please sign in to comment.