Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Property or method is not defined on the instance but referenced during render #180

Closed
@fracasula

Description

@fracasula

Hi there,

I'm having issues with Karma/Webpack I think, I'm getting a warning when mounting a component like this:

importHelloInjectorfrom'!!vue-loader?inject!./../../../src/components/Hello.vue';constgetComponentWithMockedHttp=get=>HelloInjector({'./../modules/http':{        get}});constcomponent=getComponentWithMockedHttp(()=>newPromise(resolve=>resolve('All fine here')));constvm=newVue(component).$mount();vm.helloMethod().then(message=>{expect(vm.message).toEqual(message);expect(vm.message).toBe('All fine here');expect(vm.computedMessage).toBe('All fine here!!!');done();});

There I get a warning (and a failure also) on the computed property but only if such property is in the parent class. If I move the computed property in the child class everything works fine and I get no warnings. Also it happens only when running my specs through Karma/Webpack, I don't get any warning when running it through thewebpack-dev-server.

I committed the whole thinghere. In thispull request you can see how the error goes away by just moving the computed property from the parent class into the child one.

Steps to reproduce:

  1. make dbuild (it builds the docker image on top ofnode:slim)
  2. make install (runs an npm install mounting the volume so you getnode_modules in the host)
  3. make test (runs karma with Chrome headless)

To run it in your browser instead just domake run and go tolocalhost:8080.

What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp