docs: remove clutter (#1651)

* docs: remove clutter

* chore: remove testing wallaby

* chore: remove testing sinon

* chore: remove unused link
This commit is contained in:
Pascal Schilp
2020-05-17 12:15:35 +02:00
committed by GitHub
parent 1ed68dc8a5
commit fd38914334
7 changed files with 29 additions and 130 deletions

View File

@@ -25,17 +25,12 @@
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading open">
<span>Linting</span>
<a href="/linting/" class="{% if permalink == 'linting/index.html' %}active {% endif %} sidebar-heading-link">Linting</a>
<!---->
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/linting/" class="{% if permalink == 'linting/index.html' %}active {% endif %}sidebar-link">Getting started</a>
</li>
<li>
<a href="/linting/linting-eslint.html" class="{% if permalink == 'linting/linting-eslint.html' %}active {% endif %}sidebar-link">Linting ESLint</a>
</li>
<li>
<a href="/linting/linting-types.html" class="{% if permalink == 'linting/linting-types.html' %}active {% endif %}sidebar-link">Linting Types</a>
<a href="/linting/linting-eslint.html" class="{% if permalink == 'linting/linting-eslint.html' %}active {% endif %}sidebar-link">ESLint</a>
</li>
</ul>
</section>
@@ -43,11 +38,26 @@
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<span>Developing</span>
<a href="/developing/" class="{% if permalink == 'developing/index.html' %}active {% endif %} sidebar-heading-link">Developing</a>
<!---->
</p>
</section>
</li>
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<a href="/testing/" class="{% if permalink == 'testing/index.html' %}active {% endif %} sidebar-heading-link">Testing</a>
<!---->
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/developing/" class="{% if permalink == 'developing/index.html' %}active {% endif %}sidebar-link">Developing</a>
<a href="/testing/testing.html" class="{% if permalink == 'testing/testing.html' %}active {% endif %}sidebar-link">Testing library</a>
</li>
<li>
<a href="/testing/testing-karma.html" class="{% if permalink == 'testing/testing-karma.html' %}active {% endif %}sidebar-link">Karma</a>
</li>
<li>
<a href="/testing/testing-karma-bs.html" class="{% if permalink == 'testing/testing-karma-bs.html' %}active {% endif %}sidebar-link">Browserstack</a>
</li>
</ul>
</section>
@@ -55,48 +65,17 @@
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<span>Testing</span>
<a href="/publishing/" class="{% if page.url == '/publishing/' %}active {% endif %}sidebar-heading-link">Publishing Web Components</a>
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/testing/" class="{% if permalink == 'testing/index.html' %}active {% endif %}sidebar-link">Getting started</a>
</li>
<li>
<a href="/testing/testing.html" class="{% if permalink == 'testing/testing.html' %}active {% endif %}sidebar-link">Testing</a>
</li>
<li>
<a href="/testing/testing-karma.html" class="{% if permalink == 'testing/testing-karma.html' %}active {% endif %}sidebar-link">Testing with Karma</a>
</li>
<li>
<a href="/testing/testing-karma-bs.html" class="{% if permalink == 'testing/testing-karma-bs.html' %}active {% endif %}sidebar-link">Testing via Browserstack</a>
</li>
<li>
<a href="/testing/testing-wallaby.html" class="{% if permalink == 'testing/testing-wallaby.html' %}active {% endif %}sidebar-link">Testing in IDE via Wallaby</a>
</li>
</ul>
</section>
</li>
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<span>Publishing Web Components</span>
<a href="/building/" class="{% if permalink == 'building/index.html' %}active {% endif %} sidebar-heading-link">Building</a>
<!---->
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/publishing/" class="{% if page.url == '/publishing/' %}active {% endif %}sidebar-link">Getting started</a>
</li>
</ul>
</section>
</li>
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<span>Building apps for production</span>
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/building/" class="{% if permalink == 'building/index.html' %}active {% endif %}sidebar-link">Getting started</a>
</li>
<li>
<a href="/building/building-rollup.html" class="{% if permalink == 'building/building-rollup.html' %}active {% endif %}sidebar-link">Rollup</a>
</li>
@@ -106,25 +85,17 @@
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<span>Deploying apps</span>
<a href="/deploying/" class="{% if permalink == 'deploying/index.html' %}active {% endif %} sidebar-heading-link">Deploying apps</a>
<!---->
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/deploying/" class="{% if permalink == 'deploying/index.html' %}active {% endif %}sidebar-link">Getting started</a>
</li>
</ul>
</section>
</li>
<li>
<section class="sidebar-group is-sub-group depth-1">
<p class="sidebar-heading">
<span>Demoing</span>
<a href="/demoing/" class="{% if permalink == 'demoing/index.html' %}active {% endif %} sidebar-heading-link">Demoing</a>
<!---->
</p>
<ul class="sidebar-links sidebar-group-items">
<li>
<a href="/demoing/" class="{% if permalink == 'demoing/index.html' %}active {% endif %}sidebar-link">Getting started</a>
</li>
</ul>
</section>
</li>
</ul>
@@ -172,9 +143,6 @@
<li>
<a href="/testing/testing-chai-a11y-axe.html" class="{% if permalink == 'testing/testing-chai-a11y-axe.html' %}active {% endif %}sidebar-link">Chai A11y aXe</a>
</li>
<li>
<a href="/testing/testing-sinon.html" class="{% if permalink == 'testing/testing-sinon.html' %}active {% endif %}sidebar-link">Testing with sinon</a>
</li>
<li>
<a href="/testing/semantic-dom-diff.html" class="{% if permalink == 'testing/semantic-dom-diff.html' %}active {% endif %}sidebar-link">Semantic Dom Diff</a>
</li>

View File

@@ -9,17 +9,6 @@ tags:
# About Us
- We are programmers
- We are web component enthusiasts
- We are believers of web standards
- We are hungry for knowledge
- We are open source
- We are the web
- We are humans
- [We are us](https://github.com/open-wc/open-wc/graphs/contributors)
[Join us!](https://github.com/open-wc/open-wc/)
## Why `open-wc`
We want to provide the community with well-known and experience-tested recommendations for their web component projects. Everything we do here is to encourage and support development with these open standards.

File diff suppressed because one or more lines are too long

View File

@@ -42,7 +42,6 @@ When testing with karma, we recommend the following libraries:
- [mocha](https://mochajs.org/) for setting up the testing structure.
- [chai](https://www.chaijs.com/) for doing assertions
- [sinon](https://open-wc.org/testing/testing-sinon.html) for mocks, spies and stubs
- [@open-wc/testing-helpers](https://open-wc.org/testing/testing-helpers.html) for setting up test fixtures and helper functions
- [@open-wc/semantic-dom-diff](https://open-wc.org/testing/semantic-dom-diff.html) for snapshot testing the rendered HTML
- [@open-wc/chai-axe-a11y](https://open-wc.org/testing/testing-chai-a11y-axe.html) for testing accessibility

View File

@@ -1,56 +0,0 @@
---
permalink: 'testing/testing-sinon.html'
title: Testing with sinon
section: guides
tags:
- guides
---
# Testing with sinon
[Sinon](https://sinonjs.org/) is a library that lets you set up mocks, spies, and stubs in javascript. They ship an es-module version, so it's easy to use it in your tests:
Add Sinon as a dependency:
```bash
npm i -D sinon
```
Use it in your tests:
```javascript
import { stub } from 'sinon';
import { expect, fixture, html } from '@open-wc/testing';
describe('my component', () => {
it('calls myFunction when a button is clicked', async () => {
const el = await fixture(html` <my-component></my-component> `);
// stub a function
const myFunctionStub = stub(el, 'myFunction');
// click a button
el.shadowRoot.getElementById('myButton').click();
// check if the function was called
expect(myFunctionStub).to.have.callCount(1);
});
});
```
```javascript
class MyComponent extends LitElement {
myFunction(e) {
console.log(e);
}
render() {
return html` <button @click=${e => this.myFunction(e)}>click</button> `;
}
}
customElements.define('my-component', MyComponent);
```
See the [sinon documentation](https://sinonjs.org/) to learn how to use the different features.
If you run into any problems trying to stub methods on component, please check out the [FAQ](/faq).

View File

@@ -1 +0,0 @@
../../packages/testing-wallaby/README.md

View File

@@ -8,7 +8,7 @@ tags:
# Linting ESLint
Use [ESLint](https://eslint.org/) to lint your es6 code.
Use [ESLint](https://eslint.org/) to lint your code.
[//]: # 'AUTO INSERT HEADER PREPUBLISH'