UNPKG

810 BJavaScriptView Raw
1/* @flow */
2
3import 'babel-polyfill'
4
5import PatchSyncTeX from '../../src/Rules/PatchSyncTeX'
6import { initializeRule } from '../helpers'
7
8describe('PatchSyncTeX', () => {
9 describe('constructCommand', () => {
10 it('returns correct arguments and command options.', async (done) => {
11 const { rule } = await initializeRule({
12 RuleClass: PatchSyncTeX,
13 parameters: [{
14 filePath: 'KnitrConcordance-concordance.tex'
15 }, {
16 filePath: 'SyncTeX.synctex.gz'
17 }]
18 })
19
20 expect(rule.constructCommand()).toEqual({
21 args: ['Rscript', '-e', 'library(patchSynctex);patchSynctex(\'KnitrConcordance.tex\',syncfile=\'SyncTeX\')'],
22 cd: '$ROOTDIR',
23 severity: 'warning',
24 outputs: ['$DIR_1/BASE_1']
25 })
26
27 done()
28 })
29 })
30})