From 726cd17eafac843bdce4ad5b444b5345c92cb0cb Mon Sep 17 00:00:00 2001 From: James Yu Date: Thu, 26 Sep 2024 13:58:27 +0800 Subject: [PATCH] Ditto --- test/units/12_parser_log.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/units/12_parser_log.test.ts b/test/units/12_parser_log.test.ts index 605ef4df3..75ff5bcea 100644 --- a/test/units/12_parser_log.test.ts +++ b/test/units/12_parser_log.test.ts @@ -224,7 +224,7 @@ l.4 \\draw ` const error = latexLogParser.parse(log, get.path('main.tex'))?.[0] - assert.strictEqual(error.errorPosText, ' \\draw') + assert.strictEqual(error?.errorPosText, ' \\draw') }) it('should handle multi-line LaTeX errors without line number', () => { @@ -232,7 +232,7 @@ l.4 \\draw Test message` const error = latexLogParser.parse(log, get.path('main.tex'))?.[0] - assert.strictEqual(error.text, 'Undefined control sequence.\nTest message') + assert.strictEqual(error?.text, 'Undefined control sequence.\nTest message') }) const badboxLogs = [ @@ -370,7 +370,7 @@ Test message` const log = 'Biber warning: WARN - I didn\'t find a database entry for \'nonexisting\' (section 0)' const warning = latexLogParser.parse(log, get.path('main.tex'))?.[0] assert.strictEqual(warning?.type, 'warning') - assert.strictEqual(warning.text, 'No bib entry found for \'nonexisting\'') + assert.strictEqual(warning?.text, 'No bib entry found for \'nonexisting\'') }) })