You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/testing-single-file-components-with-mocha-webpack.md
+7-10
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,17 @@
1
1
## Testing Single-File Components with Mocha + webpack
2
2
3
-
> An example project for this setup is available on [GitHub](https://github.com/vuejs/vue-test-utils-mocha-webpack-example).
4
-
5
3
Another strategy for testing SFCs is compiling all our tests via webpack and then run it in a test runner. The advantage of this approach is that it gives us full support for all webpack and `vue-loader` features, so we don't have to make compromises in our source code.
6
4
7
-
You can technically use any test runner you like and manually wire things together, but we've found [`mocha-webpack`](https://github.com/zinserjan/mocha-webpack) to provide a very streamlined experience for this particular task.
5
+
You can technically use any test runner you like and manually wire things together, but we've found [`mochapack`](https://github.com/sysgears/mochapack) to provide a very streamlined experience for this particular task.
8
6
9
-
### Setting Up `mocha-webpack`
7
+
### Setting Up `mochapack`
10
8
11
9
We will assume you are starting with a setup that already has webpack, vue-loader and Babel properly configured - e.g. the `webpack-simple` template scaffolded by `vue-cli`.
12
10
13
11
The first thing to do is installing test dependencies:
0 commit comments