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

Fix warnings in frontend tests #3625

Closed
wants to merge 3 commits into from

Commits on Jul 15, 2023

  1. Invitation.vue: do not use optional chaining in template

    The transformation jest uses cannot collect coverage for optional chaining (?.).
    Failed to collect coverage from /home/runner/work/ecamp3/ecamp3/frontend/src/views/camp/Invitation.vue
    ERROR: Unexpected token (1:1001)
    STACK: SyntaxError: Unexpected token (1:1001)
        at Parser.pp$4.raise (/home/runner/work/ecamp3/ecamp3/frontend/node_modules/vue-template-es2015-compiler/buble.js:2757:13)
        at Parser.pp.unexpected (/home/runner/work/ecamp3/ecamp3/frontend/node_modules/vue-template-es2015-compiler/buble.js:647:8)
        at Parser.pp$3.parseExprAtom (/home/runner/work/ecamp3/ecamp3/frontend/node_modules/vue-template-es2015-compiler/buble.js:2196:10)
    BacLuc committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    f246520 View commit details
    Browse the repository at this point in the history
  2. frontend: transform package url-template in jest tests

    Else jest complains:
    Jest encountered an unexpected token
    ...
     /home/runner/work/ecamp3/ecamp3/frontend/node_modules/url-template/lib/url-template.js:97
          export function parseTemplate(template) {
          ^^^^^^
    BacLuc committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    fc8a08e View commit details
    Browse the repository at this point in the history
  3. Admin.vue: register CampConditionalFields component

    Else jest complains that the component is not registered.
    Also fix Admin.spec.js, was broken in 020ffab.
    BacLuc committed Jul 15, 2023
    Configuration menu
    Copy the full SHA
    c6c682f View commit details
    Browse the repository at this point in the history