Git Product home page Git Product logo

Comments (5)

ducksoupdev avatar ducksoupdev commented on June 14, 2024

Thanks :)

There are a few things that need changing, this is one of them. I am planning to uplift to the latest version so will change this as well.

from vue-webpack-typescript.

paulvanbladel avatar paulvanbladel commented on June 14, 2024

Looking forward to that !
So nice you got rid of the .vue files :)

Don't want to bother you with too many questions (so feel free to just disregard this question) , but I'm wondering what's the way to go to test the viewModel on the level of the viewmodel data rather than the underlying html.
E.g. simple example : your about.ts has a REPO data property. How can i test if this is correctly set

expect(vm.$data, ...... )
I don't see a way how I can consule the $data prop?

Thanks
paul.

from vue-webpack-typescript.

ducksoupdev avatar ducksoupdev commented on June 14, 2024

I normally test the components from what the output is. For example, If I am expecting a REPO property to be displayed on a particular component for an element with class .repo-link then I assert that the property value is bound correctly to that element.

from vue-webpack-typescript.

ducksoupdev avatar ducksoupdev commented on June 14, 2024

I have updated the template to Vue 2.2 including using es2015 style imports. https://github.com/ducksoupdev/vue-webpack-typescript

from vue-webpack-typescript.

paulvanbladel avatar paulvanbladel commented on June 14, 2024

Regarding the above problem I had accessing the props and methods when component is created the way you do in the tests, I posted following on stackoverflow:
http://stackoverflow.com/questions/42876203/different-behavior-when-component-is-created-via-vue-extend-or-via-new-vue

I think there can be occasions to have access to the full viewModel.
If i get the correct answer, I'll prepare a PR for an additional test in your sample illustrating the technique.
Cheers.

from vue-webpack-typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.