Comments (5)
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.
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.
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.
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.
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)
- navbar contains data var object, what's the purpose? HOT 2
- Hot Replacement Not Working HOT 14
- Support for Font Awesome HOT 2
- 'npm run test' Path must be a string HOT 2
- 'npm run dev' fails on fresh install HOT 1
- Importing additionnal libraries HOT 1
- Sass hot reload don't seem to be working HOT 1
- How to include vue-meta to template? HOT 1
- support dynamic imports ? HOT 3
- Webpack configurations for NPM module bundle
- Single File Components HOT 3
- Single file components HOT 1
- Possibility to use scoped styles HOT 6
- feature suggestion: add storybook HOT 2
- css not minified HOT 8
- How about creating few services like LoginService HOT 3
- Need to include base tag in index.html
- Uglify-js is not included and is not es6-compatible
- Unable to exclude certain paths from webpack build
- DEV/PRO aware build setup HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-webpack-typescript.