No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. ymzhang23
    Y
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 1
    • Groups 0

    ymzhang23

    @ymzhang23

    1
    Reputation
    4
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    ymzhang23 Follow

    Best posts made by ymzhang23

    • @quasar/extras/mdi-v4 jest unit testing failing

      I am using the new SVG images. I have created a test for a header that contains a logo, name mdiMenu.

      import { mdiMenu } from '@quasar/extras/mdi-v4'
      

      But everything I am running the test: I always get this error:

      SyntaxError: Unexpected token 'export'
      
            29 | 
            30 | <script>
          > 31 | import { mdiMenu } from '@quasar/extras/mdi-v4'
      

      Do somebody else have encounter this problem and how can I solve this?

      This is the rest of the error message:

      This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
      
          By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
      
          Here's what you can do:
           • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
           • If you need a custom transformation specify a "transform" option in your config.
           • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.        
      
          You'll find more details and examples of these config options in the docs:
          https://jestjs.io/docs/en/configuration.html
      
          Details:
      
          C:\Users\YohnCheung\work\bitBucket\central-station\node_modules\@quasar\extras\mdi-v4\index.js:3
          export const mdiAbTesting = 'M4 2A2 2 0 0 0 2 4V12H4V8H6V12H8V4A2 2 0 0 0 6 2H4M4 4H6V6H4M22 15.5V14A2 2 0 0 0 20 12H16V22H20A2 2 0 0 0 22 20V18.5A1.54 1.54 0 0 0 20.5 17A1.54 1.54 0 0 0 22 15.5M20 20H18V18H20V20M20 16H18V14H20M5.79 21.61L4.21 20.39L18.21 2.39L19.79 3.61Z'
          ^^^^^^
      
          SyntaxError: Unexpected token 'export'
      
            29 | 
            30 | <script>
          > 31 | import { mdiMenu } from '@quasar/extras/mdi-v4'
               | ^
            32 | 
            33 | export default {
            34 |   name: 'Header',
      
            at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
            at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
            at src/components/header.vue:31:1
            at Object.<anonymous> (src/components/header.vue:73:3)
      
      posted in Help
      Y
      ymzhang23

    Latest posts made by ymzhang23

    • @quasar/extras/mdi-v4 jest unit testing failing

      I am using the new SVG images. I have created a test for a header that contains a logo, name mdiMenu.

      import { mdiMenu } from '@quasar/extras/mdi-v4'
      

      But everything I am running the test: I always get this error:

      SyntaxError: Unexpected token 'export'
      
            29 | 
            30 | <script>
          > 31 | import { mdiMenu } from '@quasar/extras/mdi-v4'
      

      Do somebody else have encounter this problem and how can I solve this?

      This is the rest of the error message:

      This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
      
          By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
      
          Here's what you can do:
           • To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
           • If you need a custom transformation specify a "transform" option in your config.
           • If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.        
      
          You'll find more details and examples of these config options in the docs:
          https://jestjs.io/docs/en/configuration.html
      
          Details:
      
          C:\Users\YohnCheung\work\bitBucket\central-station\node_modules\@quasar\extras\mdi-v4\index.js:3
          export const mdiAbTesting = 'M4 2A2 2 0 0 0 2 4V12H4V8H6V12H8V4A2 2 0 0 0 6 2H4M4 4H6V6H4M22 15.5V14A2 2 0 0 0 20 12H16V22H20A2 2 0 0 0 22 20V18.5A1.54 1.54 0 0 0 20.5 17A1.54 1.54 0 0 0 22 15.5M20 20H18V18H20V20M20 16H18V14H20M5.79 21.61L4.21 20.39L18.21 2.39L19.79 3.61Z'
          ^^^^^^
      
          SyntaxError: Unexpected token 'export'
      
            29 | 
            30 | <script>
          > 31 | import { mdiMenu } from '@quasar/extras/mdi-v4'
               | ^
            32 | 
            33 | export default {
            34 |   name: 'Header',
      
            at ScriptTransformer._transformAndBuildScript (node_modules/@jest/transform/build/ScriptTransformer.js:537:17)
            at ScriptTransformer.transform (node_modules/@jest/transform/build/ScriptTransformer.js:579:25)
            at src/components/header.vue:31:1
            at Object.<anonymous> (src/components/header.vue:73:3)
      
      posted in Help
      Y
      ymzhang23
    • RE: Brand new Electron app does not start

      Hello, Did you get an answer about this. I have the same problem with node-sass and 4.13.0 version

      posted in Help
      Y
      ymzhang23