Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

test: add chrome object to globals #601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yudukikun5120
Copy link
Collaborator

Resolved a problem with the chrome object causing a reference error when running the test suite with Jest.

❯ npx jest      
 FAIL  src/methods/ReportTemplateGenerator.test.ts
  ● Test suite failed to run

    ReferenceError: chrome is not defined

      111 | \\begin{document}
      112 | \\title{{{course-name}}\\\\{{report-title}}}
    > 113 | \\author{{{student-name}}\\\\${chrome.i18n.getMessage(
          |                                ^
      114 |     "report_template_student_code"
      115 |   )}}
      116 | \\lstset{

      at Object.chrome (src/methods/ReportTemplateGenerator.tsx:113:32)
      at Object.<anonymous> (src/methods/ReportTemplateGenerator.test.ts:5:34)

@codeclimate
Copy link

codeclimate bot commented Aug 23, 2023

Code Climate has analyzed commit f91b479 and detected 0 issues on this pull request.

View more on Code Climate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant