add new docs
This commit is contained in:
		
							
								
								
									
										55
									
								
								docs/docs/getstarted.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								docs/docs/getstarted.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,55 @@
 | 
			
		||||
# Get Started
 | 
			
		||||
 | 
			
		||||
## TypeScript
 | 
			
		||||
Use TypeScript for best in class instellisense.
 | 
			
		||||
 | 
			
		||||
A few words on TypeScript
 | 
			
		||||
 | 
			
		||||
## Included in this package
 | 
			
		||||
 | 
			
		||||
* tap compatible testing framework written in TypeScript
 | 
			
		||||
* a collection of test tools
 | 
			
		||||
* **code** testing framework with typings
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## Write your first tests
 | 
			
		||||
``` javascript
 | 
			
		||||
import {tap, expect} from 'tapbundle' // has typings in place
 | 
			
		||||
 | 
			
		||||
import * as myAwesomeModuleToTest from '../dist/index' // '../dist/index' is the standard path for npmts modules
 | 
			
		||||
 | 
			
		||||
tap.test('my awesome description', async (tools) => { // tools are optional parameter
 | 
			
		||||
  tools.timeout(2000) // test will fail if it takes longer than 2000 millisenconds
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
let myTest2 = tap.test('my awesome test 2', async (tools) => {
 | 
			
		||||
  myAwsomeModuleToTest.doSomethingAsync() // we don't wait here
 | 
			
		||||
  await tools.delayFor(3000) // yay! :) promise based timeouts :)
 | 
			
		||||
  console.log('This gets logged 3000 ms into the test')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
tap.test('my awesome test 3', async (tools) => {
 | 
			
		||||
  expect(true).to.be.true // will not throw
 | 
			
		||||
  await expect(tools.delayFor(2000)).to.eventually.be.fulfilled // yay expect promises :)
 | 
			
		||||
  expect((await myTest2.promise).hrtMeasurement.milliSeconds > 1000).to.be.true // access other tests metadata :)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
let myTest4 = tap.testParallel('my awesome test 4', async (tools) => {
 | 
			
		||||
  await tools.delayFor(4000)
 | 
			
		||||
  console.log('logs to console after 4 seconds into this test')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
tap.test('my awesome test 5', async () => {
 | 
			
		||||
  expect(myTest4.status).to.equal('pending') // since this test will likely finish before myTest4.
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
tap.start() // start the test, will automtically plan tests for you (so the tap parser knows when tests exit bofore they are finished)
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For further information read the linked docs at the top of this README.
 | 
			
		||||
 | 
			
		||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
 | 
			
		||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
 | 
			
		||||
 | 
			
		||||
[](https://push.rocks)
 | 
			
		||||
@@ -18,59 +18,6 @@ tap bundled for tapbuffer
 | 
			
		||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
 | 
			
		||||
[](http://standardjs.com/)
 | 
			
		||||
 | 
			
		||||
## Usage
 | 
			
		||||
Use TypeScript for best in class instellisense.
 | 
			
		||||
 | 
			
		||||
This package includes
 | 
			
		||||
 | 
			
		||||
* tap compatible testing framework written in TypeScript
 | 
			
		||||
* npm package chai (through smartchai)
 | 
			
		||||
* npm package chai-as-promised (through smartchai)
 | 
			
		||||
* npm package chai-string (through smartchai)
 | 
			
		||||
* npm package @types/chai (through smartchai)
 | 
			
		||||
* npm package @types/chai-as-promised (through smartchai)
 | 
			
		||||
* npm package @types/chai-string (through smartchai)
 | 
			
		||||
 | 
			
		||||
It also implements its own tap testing engine, that is fully typed.
 | 
			
		||||
 | 
			
		||||
In other words: This package is fully typed :)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Get started with writing your first test file.
 | 
			
		||||
```javascript
 | 
			
		||||
import {tap, expect} from 'tapbundle' // has typings in place
 | 
			
		||||
 | 
			
		||||
import * as myAwesomeModuleToTest from '../dist/index' // '../dist/index' is the standard path for npmts modules
 | 
			
		||||
 | 
			
		||||
tap.test('my awesome description', async (tools) => { // tools are optional parameter
 | 
			
		||||
  tools.timeout(2000) // test will fail if it takes longer than 2000 millisenconds
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
let myTest2 = tap.test('my awesome test 2', async (tools) => {
 | 
			
		||||
  myAwsomeModuleToTest.doSomethingAsync() // we don't wait here
 | 
			
		||||
  await tools.delayFor(3000) // yay! :) promise based timeouts :)
 | 
			
		||||
  console.log('This gets logged 3000 ms into the test')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
tap.test('my awesome test 3', async (tools) => {
 | 
			
		||||
  expect(true).to.be.true // will not throw
 | 
			
		||||
  await expect(tools.delayFor(2000)).to.eventually.be.fulfilled // yay expect promises :)
 | 
			
		||||
  expect((await myTest2.promise).hrtMeasurement.milliSeconds > 1000).to.be.true // access other tests metadata :)
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
let myTest4 = tap.testParallel('my awesome test 4', async (tools) => {
 | 
			
		||||
  await tools.delayFor(4000)
 | 
			
		||||
  console.log('logs to console after 4 seconds into this test')
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
tap.test('my awesome test 5', async () => {
 | 
			
		||||
  expect(myTest4.status).to.equal('pending') // since this test will likely finish before myTest4.
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
tap.start() // start the test, will automtically plan tests for you (so the tap parser knows when tests exit bofore they are finished)
 | 
			
		||||
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
For further information read the linked docs at the top of this README.
 | 
			
		||||
 | 
			
		||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
 | 
			
		||||
							
								
								
									
										23
									
								
								docs/docs/license.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								docs/docs/license.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
# License
 | 
			
		||||
 | 
			
		||||
**MIT License**
 | 
			
		||||
 | 
			
		||||
Copyright © 2016 - 2017 Martin Donath
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
of this software and associated documentation files (the "Software"), to
 | 
			
		||||
deal in the Software without restriction, including without limitation the
 | 
			
		||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 | 
			
		||||
sell copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
The above copyright notice and this permission notice shall be included in
 | 
			
		||||
all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 | 
			
		||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 | 
			
		||||
IN THE SOFTWARE.
 | 
			
		||||
							
								
								
									
										87
									
								
								docs/mkdocs.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										87
									
								
								docs/mkdocs.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,87 @@
 | 
			
		||||
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
 | 
			
		||||
 | 
			
		||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
# of this software and associated documentation files (the "Software"), to
 | 
			
		||||
# deal in the Software without restriction, including without limitation the
 | 
			
		||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 | 
			
		||||
# sell copies of the Software, and to permit persons to whom the Software is
 | 
			
		||||
# furnished to do so, subject to the following conditions:
 | 
			
		||||
 | 
			
		||||
# The above copyright notice and this permission notice shall be included in
 | 
			
		||||
# all copies or substantial portions of the Software.
 | 
			
		||||
 | 
			
		||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 | 
			
		||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 | 
			
		||||
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
 | 
			
		||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
			
		||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 | 
			
		||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 | 
			
		||||
# IN THE SOFTWARE.
 | 
			
		||||
 | 
			
		||||
# Project information
 | 
			
		||||
site_name: tapbundle | docs
 | 
			
		||||
site_description: a taprunner
 | 
			
		||||
site_author: Lossless GmbH
 | 
			
		||||
site_url: https://push.rocks
 | 
			
		||||
 | 
			
		||||
# Repository
 | 
			
		||||
repo_name: pushrocks/tapbundle
 | 
			
		||||
repo_url: https://gitlab.com/pushrocks/tapbundle
 | 
			
		||||
 | 
			
		||||
# Copyright
 | 
			
		||||
copyright: 'Copyright © 2014 Lossless GmbH'
 | 
			
		||||
 | 
			
		||||
# Theme directory
 | 
			
		||||
theme: material
 | 
			
		||||
theme_dir: 'theme'
 | 
			
		||||
 | 
			
		||||
# Options
 | 
			
		||||
extra:
 | 
			
		||||
  feature:
 | 
			
		||||
    tabs: false
 | 
			
		||||
  palette:
 | 
			
		||||
    primary: indigo
 | 
			
		||||
    accent: indigo
 | 
			
		||||
  social:
 | 
			
		||||
    - type: globe
 | 
			
		||||
      link: http://lossless.com
 | 
			
		||||
    - type: github-alt
 | 
			
		||||
      link: https://github.com/philkunz
 | 
			
		||||
    - type: twitter
 | 
			
		||||
      link: https://twitter.com/philkunzcom
 | 
			
		||||
    - type: linkedin
 | 
			
		||||
      link: https://linkedin.com/in/philippkunz
 | 
			
		||||
 | 
			
		||||
# Extensions
 | 
			
		||||
markdown_extensions:
 | 
			
		||||
  - markdown.extensions.admonition
 | 
			
		||||
  - markdown.extensions.codehilite(guess_lang=false, linenums=true)
 | 
			
		||||
  - markdown.extensions.def_list
 | 
			
		||||
  - markdown.extensions.footnotes
 | 
			
		||||
  - markdown.extensions.meta
 | 
			
		||||
  - markdown.extensions.toc(permalink=true)
 | 
			
		||||
  - pymdownx.arithmatex
 | 
			
		||||
  - pymdownx.betterem(smart_enable=all)
 | 
			
		||||
  - pymdownx.caret
 | 
			
		||||
  - pymdownx.critic
 | 
			
		||||
  - pymdownx.details
 | 
			
		||||
  - pymdownx.emoji:
 | 
			
		||||
      emoji_generator: !!python/name:pymdownx.emoji.to_svg
 | 
			
		||||
  - pymdownx.inlinehilite
 | 
			
		||||
  - pymdownx.magiclink
 | 
			
		||||
  - pymdownx.mark
 | 
			
		||||
  - pymdownx.smartsymbols
 | 
			
		||||
  - pymdownx.superfences
 | 
			
		||||
  - pymdownx.tasklist(custom_checkbox=true)
 | 
			
		||||
  - pymdownx.tilde
 | 
			
		||||
 | 
			
		||||
# Page tree
 | 
			
		||||
pages:
 | 
			
		||||
  - Repo Readme: index.md
 | 
			
		||||
  - Get Started: getstarted.md
 | 
			
		||||
  - License: license.md
 | 
			
		||||
 | 
			
		||||
# Google Analytics
 | 
			
		||||
google_analytics:
 | 
			
		||||
  - !!python/object/apply:os.getenv ["GOOGLE_ANALYTICS_KEY"]
 | 
			
		||||
  - auto
 | 
			
		||||
							
								
								
									
										56
									
								
								docs/theme/partials/footer.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								docs/theme/partials/footer.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
			
		||||
{% import "partials/language.html" as lang %}
 | 
			
		||||
<footer class="md-footer">
 | 
			
		||||
  {% if page.previous_page or page.next_page %}
 | 
			
		||||
    <div class="md-footer-nav">
 | 
			
		||||
      <nav class="md-footer-nav__inner md-grid">
 | 
			
		||||
        {% if page.previous_page %}
 | 
			
		||||
          <a href="{{ page.previous_page.url }}" title="{{ page.previous_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
 | 
			
		||||
            <div class="md-flex__cell md-flex__cell--shrink">
 | 
			
		||||
              <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
 | 
			
		||||
              <span class="md-flex__ellipsis">
 | 
			
		||||
                <span class="md-footer-nav__direction">
 | 
			
		||||
                  {{ lang.t("footer.previous") }}
 | 
			
		||||
                </span>
 | 
			
		||||
                {{ page.previous_page.title }}
 | 
			
		||||
              </span>
 | 
			
		||||
            </div>
 | 
			
		||||
          </a>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        {% if page.next_page %}
 | 
			
		||||
          <a href="{{ page.next_page.url }}" title="{{ page.next_page.title }}" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
 | 
			
		||||
            <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
 | 
			
		||||
              <span class="md-flex__ellipsis">
 | 
			
		||||
                <span class="md-footer-nav__direction">
 | 
			
		||||
                  {{ lang.t("footer.next") }}
 | 
			
		||||
                </span>
 | 
			
		||||
                {{ page.next_page.title }}
 | 
			
		||||
              </span>
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="md-flex__cell md-flex__cell--shrink">
 | 
			
		||||
              <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
 | 
			
		||||
            </div>
 | 
			
		||||
          </a>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
      </nav>
 | 
			
		||||
    </div>
 | 
			
		||||
  {% endif %}
 | 
			
		||||
  <div class="md-footer-meta md-typeset">
 | 
			
		||||
    <div class="md-footer-meta__inner md-grid">
 | 
			
		||||
      <div class="md-footer-copyright">
 | 
			
		||||
        {% if config.copyright %}
 | 
			
		||||
          <div class="md-footer-copyright__highlight">
 | 
			
		||||
            {{ config.copyright }}
 | 
			
		||||
          </div>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
        <a href="https://lossless.gmbh" title="push.rocks">Impressum</a>
 | 
			
		||||
        |
 | 
			
		||||
        <a href="https://lossless.com" title="Lossless GmbH">Company Website</a>
 | 
			
		||||
      </div>
 | 
			
		||||
      {% block social %}
 | 
			
		||||
        {% include "partials/social.html" %}
 | 
			
		||||
      {% endblock %}
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</footer>
 | 
			
		||||
		Reference in New Issue
	
	Block a user