removing docs from master branch

This commit is contained in:
Micah Godbolt
2019-02-25 10:12:40 -08:00
parent ca136c95b5
commit 54f3c205f4
364 changed files with 0 additions and 10581 deletions

View File

@@ -1 +0,0 @@
<!doctype html><html><head><link rel="stylesheet" href="../../assets/step.css"></head><body class="ms-Fabric"><div id="markdownReadme"></div><div id="app">For this step, we look at unit testing. Run<pre>npm test</pre>in the command line.</div><script src="../../step2-04/demo/step2-04/demo.js"></script><script src="../../markdownReadme/markdownReadme.js"></script></body></html>

View File

@@ -1,11 +0,0 @@
import React from 'react';
import { mount } from 'enzyme';
import { TestMe } from './TestMe';
describe('TestMe Component', () => {
it('should have a non-clickable component when the origina InnerMe is clicked', () => {
const wrapper = mount(<TestMe name="world" />);
wrapper.find('#innerMe').simulate('click');
expect(wrapper.find('#innerMe').text()).toBe('Clicked');
});
});

View File

@@ -1,37 +0,0 @@
import React from 'react';
export interface TestMeProps {
name: string;
}
export interface TestMeState {
clicked: boolean;
}
export const TestMe = (props: TestMeProps) => {
return (
<div id="testMe">
<InnerMe name={props.name} />
</div>
);
};
export class InnerMe extends React.Component<TestMeProps, TestMeState> {
state = {
clicked: false
};
onClick = () => {
this.setState({ clicked: true });
};
render() {
return !this.state.clicked ? (
<div onClick={this.onClick} id="innerMe">
Hello {this.props.name}, Click Me
</div>
) : (
<div id="innerMe">Clicked</div>
);
}
}

View File

@@ -1,39 +0,0 @@
import { square } from '.';
import { multiply } from './multiply';
// Mocked here by jest for the entire test module file
jest.mock('./multiply');
describe('jest example', () => {
beforeEach(() => {
jest.resetModules();
});
it('should be passing in the multiple two of the same number', () => {
square(5);
// .toBeCalledTimes() and .toBeCalledWith() only work on mocks - we mocked the multiply function from the
expect(multiply).toBeCalledTimes(1);
expect(multiply).toBeCalledWith(5, 5);
});
it('should increment counter', () => {
const { increment } = require('.');
expect(increment()).toBe(1);
});
it('should decrement counter', () => {
const { decrement } = require('.');
expect(decrement()).toBe(-1);
});
it('should retrieve count', () => {
const { decrement, getCount, increment } = require('.');
increment();
increment();
decrement();
increment();
expect(getCount()).toBe(2);
});
});

View File

@@ -1,19 +0,0 @@
import { multiply } from './multiply';
let counter = 0;
export function getCount() {
return counter;
}
export function increment() {
return ++counter;
}
export function decrement() {
return --counter;
}
export function square(x: number) {
return multiply(x, x);
}

View File

@@ -1,3 +0,0 @@
export function multiply(x: number, y: number) {
return x * y;
}

View File

@@ -1,2 +0,0 @@
!function(n){var e={};function t(r){if(e[r])return e[r].exports;var u=e[r]={i:r,l:!1,exports:{}};return n[r].call(u.exports,u,u.exports,t),u.l=!0,u.exports}t.m=n,t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var u in n)t.d(r,u,function(e){return n[e]}.bind(null,u));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},t.p="",t(t.s=149)}({149:function(n,e,t){"use strict";t.r(e),t.d(e,"getCount",function(){return u}),t.d(e,"increment",function(){return o}),t.d(e,"decrement",function(){return i}),t.d(e,"square",function(){return f});var r=0;function u(){return r}function o(){return++r}function i(){return--r}function f(n){return function(n,e){return n*e}(n,n)}}});
//# sourceMappingURL=demo.js.map

File diff suppressed because one or more lines are too long