Skip to content

Docs: Create "Installation" section out of Guide #1610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ module.exports = {
],
sidebar: [
'/',
'/installation/',
'/guides/',
'/api/',
'/api/wrapper/',
Expand All @@ -81,6 +82,7 @@ module.exports = {
],
sidebar: [
'/zh/',
'/zh/installation/',
'/zh/guides/',
'/zh/api/',
'/zh/api/wrapper/',
Expand All @@ -105,6 +107,7 @@ module.exports = {
],
sidebar: [
'/ja/',
'/ja/installation/',
'/ja/guides/',
'/ja/api/',
'/ja/api/wrapper/',
Expand All @@ -129,6 +132,7 @@ module.exports = {
],
sidebar: [
'/ru/',
'/ru/installation/',
'/ru/guides/',
'/ru/api/',
'/ru/api/wrapper/',
Expand Down
6 changes: 1 addition & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ Vue Test Utils is the official unit testing utility library for Vue.js.

<div class="vueschool"><a href="https://vueschool.io/courses/learn-how-to-test-vuejs-components?friend=vuejs" target="_blank" rel="sponsored noopener" title="Learn how to use Vue Test Utils to test Vue.js Components with Vue School">Learn how to test Vue.js components with Vue School</a></div>

- [Installation](./installation/)
- [Guides](./guides/)
- [Getting Started](./guides/getting-started.md)
- [Common Tips](guides/common-tips.md)
- [Mouse, Key and other DOM Events](guides/dom-events.md)
- [Choosing a test runner](guides/choosing-a-test-runner.md)
- [Testing Single-File Components with Jest](guides/testing-single-file-components-with-jest.md)
- [Testing Single-File Components with Mocha + webpack](guides/testing-single-file-components-with-mocha-webpack.md)
- [Testing Single-File Components with Karma](guides/testing-single-file-components-with-karma.md)
- [Testing in Node.js Without a Build Step](guides/usage-without-a-build-step-node.md)
- [Testing Asynchronous Behavior](guides/testing-async-components.md)
- [Using with TypeScript](guides/using-with-typescript.md)
- [Using with Vue Router](guides/using-with-vue-router.md)
Expand Down
5 changes: 0 additions & 5 deletions docs/guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
!!!include(docs/guides/getting-started.md)!!!
!!!include(docs/guides/common-tips.md)!!!
!!!include(docs/guides/dom-events.md)!!!
!!!include(docs/guides/choosing-a-test-runner.md)!!!
!!!include(docs/guides/testing-single-file-components-with-jest.md)!!!
!!!include(docs/guides/testing-single-file-components-with-mocha-webpack.md)!!!
!!!include(docs/guides/testing-single-file-components-with-karma.md)!!!
!!!include(docs/guides/usage-without-a-build-step-node.md)!!!
!!!include(docs/guides/testing-async-components.md)!!!
!!!include(docs/guides/using-with-typescript.md)!!!
!!!include(docs/guides/using-with-vue-router.md)!!!
Expand Down
48 changes: 0 additions & 48 deletions docs/guides/choosing-a-test-runner.md

This file was deleted.

51 changes: 2 additions & 49 deletions docs/guides/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,56 +4,9 @@

### Setup

To get a quick taste of using Vue Test Utils, clone our demo repository with basic setup and install the dependencies:
If you already have a project that was created with the [Vue CLI](https://cli.vuejs.org/), you might want to add and configure the [core Jest plugin](https://cli.vuejs.org/core-plugins/unit-jest.html) or the [core Mocha plugin](https://cli.vuejs.org/core-plugins/unit-mocha.html).

```bash
git clone https://github.com/vuejs/vue-test-utils-getting-started
cd vue-test-utils-getting-started
npm install
```

If you already have a project that was created with the [Vue CLI](https://cli.vuejs.org/) and want to add testing capabilities you may run:

```bash
# unit testing
vue add @vue/unit-jest

# or:
vue add @vue/unit-mocha

# end-to-end
vue add @vue/e2e-cypress

# or:
vue add @vue/e2e-nightwatch
```

You will see that the project includes a simple component, `counter.js`:

```js
// counter.js

export default {
template: `
<div>
<span class="count">{{ count }}</span>
<button @click="increment">Increment</button>
</div>
`,

data() {
return {
count: 0
}
},

methods: {
increment() {
this.count++
}
}
}
```
If needed, check out the [Installation guides](../installation/README.md) for further details.

### Mounting Components

Expand Down
219 changes: 0 additions & 219 deletions docs/guides/testing-single-file-components-with-jest.md

This file was deleted.

Loading