Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant