Skip to content

Can't do multiple injects on the same file #434

Closed
@flippidippi

Description

@flippidippi

When writing tests and I would like to change what is injected into a Vue file per test, but I get an error like Object is not a constructor (evaluating '__vue_exports__(injections)').

I'm doing something like

import SendInjector from '!!vue?inject!src/views/Send'
 
describe('Send', () => {
  let test = (store) => {
    let Send = SendInjector({ store })
  }
})

If I call test once then it works as expected, but it throws an error on the second call.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions