Skip to content

Commit

Permalink
react: various updates after last course
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-knoebl committed Apr 20, 2021
1 parent b096cbe commit 83cab1a
Show file tree
Hide file tree
Showing 58 changed files with 2,553 additions and 1,364 deletions.
5 changes: 4 additions & 1 deletion dist/javascript-testing-de-document.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ <h2>Puppeteer</h2>
<li><code>page.waitForNavigation()</code></li>
</ul>
<p><a href="https://github.com/puppeteer/puppeteer/blob/main/docs/api.md">vollständiges API</a></p>
<h2>Übung</h2>
<p>schreibe Tests für die Todo-App unter:</p>
<p><a href="https://do49e.csb.app/">https://do49e.csb.app/</a></p>
<h1>Mocking mit Jest</h1>
<h2>Mocking von built-ins</h2>
<p>Mocking von <em>localStorage</em> (welches in node nicht verfügbar ist) mit Beispieldaten:</p>
Expand All @@ -272,7 +275,7 @@ <h2>Mocking von Modulen</h2>
}));
</code></pre>
<h2>Mocking von Modulen</h2>
<p>Mocking von Modulen via __mocks__ folders:</p>
<p>Mocking von Modulen via __mocks__ Ordnern:</p>
<pre><code class="hljs language-txt">__mocks__/fs.js
__mocks__/axios.js
src/foo.js
Expand Down
5 changes: 4 additions & 1 deletion dist/javascript-testing-de.html
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,9 @@
<li><code>page.waitForNavigation()</code></li>
</ul>
<p><a href="https://github.com/puppeteer/puppeteer/blob/main/docs/api.md">vollständiges API</a></p>
</section><section class="slide"><h2>Übung</h2>
<p>schreibe Tests für die Todo-App unter:</p>
<p><a href="https://do49e.csb.app/">https://do49e.csb.app/</a></p>
</section></section><section class="slides-section"><section class="slide"><h1>Mocking mit Jest</h1>
</section><section class="slide"><h2>Mocking von built-ins</h2>
<p>Mocking von <em>localStorage</em> (welches in node nicht verfügbar ist) mit Beispieldaten:</p>
Expand All @@ -2334,7 +2337,7 @@
}));
</code></pre>
</section><section class="slide"><h2>Mocking von Modulen</h2>
<p>Mocking von Modulen via __mocks__ folders:</p>
<p>Mocking von Modulen via __mocks__ Ordnern:</p>
<pre><code class="hljs language-txt">__mocks__/fs.js
__mocks__/axios.js
src/foo.js
Expand Down
8 changes: 7 additions & 1 deletion dist/javascript-testing-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ wichtige Methoden:

[vollständiges API](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md)

## Übung

schreibe Tests für die Todo-App unter:

<https://do49e.csb.app/>

# Mocking mit Jest

## Mocking von built-ins
Expand All @@ -380,7 +386,7 @@ jest.mock('axios', () => ({

## Mocking von Modulen

Mocking von Modulen via \_\_mocks\_\_ folders:
Mocking von Modulen via \_\_mocks\_\_ Ordnern:

```txt
__mocks__/fs.js
Expand Down
3 changes: 3 additions & 0 deletions dist/javascript-testing-en-document.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ <h2>Puppeteer</h2>
<li><code>page.waitForNavigation()</code></li>
</ul>
<p><a href="https://github.com/puppeteer/puppeteer/blob/main/docs/api.md">complete API</a></p>
<h2>Exercise</h2>
<p>Write tests for the todo app at:</p>
<p><a href="https://do49e.csb.app/">https://do49e.csb.app/</a></p>
<h1>Mocking with jest</h1>
<h2>Mocking built-ins</h2>
<p>mocking <em>localStorage</em> (which is not available in node) with example content:</p>
Expand Down
3 changes: 3 additions & 0 deletions dist/javascript-testing-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,9 @@
<li><code>page.waitForNavigation()</code></li>
</ul>
<p><a href="https://github.com/puppeteer/puppeteer/blob/main/docs/api.md">complete API</a></p>
</section><section class="slide"><h2>Exercise</h2>
<p>Write tests for the todo app at:</p>
<p><a href="https://do49e.csb.app/">https://do49e.csb.app/</a></p>
</section></section><section class="slides-section"><section class="slide"><h1>Mocking with jest</h1>
</section><section class="slide"><h2>Mocking built-ins</h2>
<p>mocking <em>localStorage</em> (which is not available in node) with example content:</p>
Expand Down
6 changes: 6 additions & 0 deletions dist/javascript-testing-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ important methods:

[complete API](https://github.com/puppeteer/puppeteer/blob/main/docs/api.md)

## Exercise

Write tests for the todo app at:

<https://do49e.csb.app/>

# Mocking with jest

## Mocking built-ins
Expand Down
5 changes: 4 additions & 1 deletion dist/react-class-components-de-document.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,7 @@ <h2>Beispiel: Clock-Komponente</h2>
<span class="hljs-function"><span class="hljs-title">componentWillUnmount</span>(<span class="hljs-params"></span>)</span> {
<span class="hljs-built_in">clearInterval</span>(<span class="hljs-built_in">this</span>.intervalId);
}
</code></pre>
</code></pre>
<h1>Exercises</h1>
<h2>Exercises</h2>
<p>convert existing components (e.g. <code>AddTodo</code>) from function components to class components</p>
5 changes: 4 additions & 1 deletion dist/react-class-components-de.html
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,10 @@
<span class="hljs-function"><span class="hljs-title">componentWillUnmount</span>(<span class="hljs-params"></span>)</span> {
<span class="hljs-built_in">clearInterval</span>(<span class="hljs-built_in">this</span>.intervalId);
}
</code></pre></section></section></div>
</code></pre>
</section></section><section class="slides-section"><section class="slide"><h1>Exercises</h1>
</section><section class="slide"><h2>Exercises</h2>
<p>convert existing components (e.g. <code>AddTodo</code>) from function components to class components</p></section></section></div>
</div>
<script>/*!
* reveal.js
Expand Down
6 changes: 6 additions & 0 deletions dist/react-class-components-de.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,9 @@ class DocumentTitle extends Component {
clearInterval(this.intervalId);
}
```

# Exercises

## Exercises

convert existing components (e.g. `AddTodo`) from function components to class components
5 changes: 4 additions & 1 deletion dist/react-class-components-en-document.html
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,7 @@ <h2>Example: Clock component</h2>
<span class="hljs-function"><span class="hljs-title">componentWillUnmount</span>(<span class="hljs-params"></span>)</span> {
<span class="hljs-built_in">clearInterval</span>(<span class="hljs-built_in">this</span>.intervalId);
}
</code></pre>
</code></pre>
<h1>Übungen</h1>
<h2>Übungen</h2>
<p>Konvertiere bestehende Komponenten (z.B. <code>AddTodo</code>) von Funktionskomponenten zu Klassenkomponenten</p>
5 changes: 4 additions & 1 deletion dist/react-class-components-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,10 @@
<span class="hljs-function"><span class="hljs-title">componentWillUnmount</span>(<span class="hljs-params"></span>)</span> {
<span class="hljs-built_in">clearInterval</span>(<span class="hljs-built_in">this</span>.intervalId);
}
</code></pre></section></section></div>
</code></pre>
</section></section><section class="slides-section"><section class="slide"><h1>Übungen</h1>
</section><section class="slide"><h2>Übungen</h2>
<p>Konvertiere bestehende Komponenten (z.B. <code>AddTodo</code>) von Funktionskomponenten zu Klassenkomponenten</p></section></section></div>
</div>
<script>/*!
* reveal.js
Expand Down
6 changes: 6 additions & 0 deletions dist/react-class-components-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,9 @@ class DocumentTitle extends Component {
clearInterval(this.intervalId);
}
```

# Übungen

## Übungen

Konvertiere bestehende Komponenten (z.B. `AddTodo`) von Funktionskomponenten zu Klassenkomponenten
Loading

0 comments on commit 83cab1a

Please sign in to comment.