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

    Bug LocalStorage in Jest

    Help
    2
    2
    300
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rafaelst2000 last edited by

      Hello everyone, i’m having this bug when i try running jest in my project:

      TypeError: quasar_1.LocalStorage.getItem is not a function

      quasar.conf.js

      // Quasar plugins
            plugins: [
              'Notify',
              'Dialog',
              'LocalStorage',
              'SessionStorage',
              'Loading',
              'AppFullscreen'
            ]
      

      my test file:

      import { createLocalVue, shallowMount, mount } from '@vue/test-utils'
      import * as All from 'quasar'
      const { Quasar } = All
      
      import Vuelidate from 'vuelidate'
      import GcCreateAccount from '../gcCreateAccount.vue'
      
      const localVue = createLocalVue()
      localVue.use(Vuelidate)
      localVue.use(Quasar, {
        components: [All],
        plugins: [All],
        directives: [All]
      })
      
      dobbel 1 Reply Last reply Reply Quote 0
      • dobbel
        dobbel @rafaelst2000 last edited by

        @rafaelst2000

        probably best to report testing issues in the Quasar testing github issues page:

        https://github.com/quasarframework/quasar-testing

        1 Reply Last reply Reply Quote 1
        • First post
          Last post