Dieses Repository beinhaltet HTML- und Javascript Code zur einer NotizenWebApp auf Basis von Web Storage. Zudem sind Mocha/Chai Tests im Browser enthalten. https://meinenotizen.netlify.app/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 7.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <h1 align=center>
  2. <a href="http://chaijs.com" title="Chai Documentation">
  3. <img alt="ChaiJS" src="http://chaijs.com/img/chai-logo.png">
  4. </a>
  5. <br>
  6. chai
  7. </h1>
  8. <p align=center>
  9. Chai is a BDD / TDD assertion library for <a href="http://nodejs.org">node</a> and the browser that can be delightfully paired with any javascript testing framework.
  10. </p>
  11. <p align=center>
  12. <a href="./LICENSE">
  13. <img
  14. alt="license:mit"
  15. src="https://img.shields.io/badge/license-mit-green.svg?style=flat-square"
  16. />
  17. </a>
  18. <a href="https://github.com/chaijs/chai/releases">
  19. <img
  20. alt="tag:?"
  21. src="https://img.shields.io/github/tag/chaijs/chai.svg?style=flat-square"
  22. />
  23. </a>
  24. <a href="https://www.npmjs.com/package/chai">
  25. <img
  26. alt="node:?"
  27. src="https://img.shields.io/badge/node-%3E=4.0-blue.svg?style=flat-square"
  28. />
  29. </a>
  30. <br/>
  31. <a href="https://saucelabs.com/u/chaijs">
  32. <img
  33. alt="Selenium Test Status"
  34. src="https://saucelabs.com/browser-matrix/chaijs.svg"
  35. />
  36. </a>
  37. <br/>
  38. <a href="https://www.npmjs.com/packages/chai">
  39. <img
  40. alt="downloads:?"
  41. src="https://img.shields.io/npm/dm/chai.svg?style=flat-square"
  42. />
  43. </a>
  44. <a href="https://travis-ci.org/chaijs/chai">
  45. <img
  46. alt="build:?"
  47. src="https://img.shields.io/travis/chaijs/chai/master.svg?style=flat-square"
  48. />
  49. </a>
  50. <a href="https://codecov.io/gh/chaijs/chai">
  51. <img
  52. alt="coverage:?"
  53. src="https://img.shields.io/codecov/c/github/chaijs/chai.svg?style=flat-square"
  54. />
  55. </a>
  56. <a href="">
  57. <img
  58. alt="devDependencies:?"
  59. src="https://img.shields.io/david/chaijs/chai.svg?style=flat-square"
  60. />
  61. </a>
  62. <br/>
  63. <a href="https://chai-slack.herokuapp.com/">
  64. <img
  65. alt="Join the Slack chat"
  66. src="https://img.shields.io/badge/slack-join%20chat-E2206F.svg?style=flat-square"
  67. />
  68. </a>
  69. <a href="https://gitter.im/chaijs/chai">
  70. <img
  71. alt="Join the Gitter chat"
  72. src="https://img.shields.io/badge/gitter-join%20chat-D0104D.svg?style=flat-square"
  73. />
  74. </a>
  75. <a href="https://opencollective.com/chaijs">
  76. <img
  77. alt="OpenCollective Backers"
  78. src="https://opencollective.com/chaijs/backers/badge.svg?style=flat-square"
  79. />
  80. </a>
  81. </p>
  82. For more information or to download plugins, view the [documentation](http://chaijs.com).
  83. ## What is Chai?
  84. Chai is an _assertion library_, similar to Node's built-in `assert`. It makes testing much easier by giving you lots of assertions you can run against your code.
  85. ## Installation
  86. ### Node.js
  87. `chai` is available on [npm](http://npmjs.org). To install it, type:
  88. $ npm install chai
  89. ### Browsers
  90. You can also use it within the browser; install via npm and use the `chai.js` file found within the download. For example:
  91. ```html
  92. <script src="./node_modules/chai/chai.js"></script>
  93. ```
  94. ## Usage
  95. Import the library in your code, and then pick one of the styles you'd like to use - either `assert`, `expect` or `should`:
  96. ```js
  97. var chai = require('chai');
  98. var assert = chai.assert; // Using Assert style
  99. var expect = chai.expect; // Using Expect style
  100. var should = chai.should(); // Using Should style
  101. ```
  102. ### Pre-Native Modules Usage (_registers the chai testing style globally_)
  103. ```js
  104. require('chai/register-assert'); // Using Assert style
  105. require('chai/register-expect'); // Using Expect style
  106. require('chai/register-should'); // Using Should style
  107. ```
  108. ### Pre-Native Modules Usage (_as local variables_)
  109. ```js
  110. const { assert } = require('chai'); // Using Assert style
  111. const { expect } = require('chai'); // Using Expect style
  112. const { should } = require('chai'); // Using Should style
  113. should(); // Modifies `Object.prototype`
  114. const { expect, use } = require('chai'); // Creates local variables `expect` and `use`; useful for plugin use
  115. ```
  116. ### Native Modules Usage (_registers the chai testing style globally_)
  117. ```js
  118. import 'chai/register-assert'; // Using Assert style
  119. import 'chai/register-expect'; // Using Expect style
  120. import 'chai/register-should'; // Using Should style
  121. ```
  122. ### Native Modules Usage (_local import only_)
  123. ```js
  124. import { assert } from 'chai'; // Using Assert style
  125. import { expect } from 'chai'; // Using Expect style
  126. import { should } from 'chai'; // Using Should style
  127. should(); // Modifies `Object.prototype`
  128. ```
  129. ### Usage with Mocha
  130. ```bash
  131. mocha spec.js -r chai/register-assert # Using Assert style
  132. mocha spec.js -r chai/register-expect # Using Expect style
  133. mocha spec.js -r chai/register-should # Using Should style
  134. ```
  135. [Read more about these styles in our docs](http://chaijs.com/guide/styles/).
  136. ## Plugins
  137. Chai offers a robust Plugin architecture for extending Chai's assertions and interfaces.
  138. - Need a plugin? View the [official plugin list](http://chaijs.com/plugins).
  139. - Want to build a plugin? Read the [plugin api documentation](http://chaijs.com/guide/plugins/).
  140. - Have a plugin and want it listed? Simply add the following keywords to your package.json:
  141. - `chai-plugin`
  142. - `browser` if your plugin works in the browser as well as Node.js
  143. - `browser-only` if your plugin does not work with Node.js
  144. ### Related Projects
  145. - [chaijs / chai-docs](https://github.com/chaijs/chai-docs): The chaijs.com website source code.
  146. - [chaijs / assertion-error](https://github.com/chaijs/assertion-error): Custom `Error` constructor thrown upon an assertion failing.
  147. - [chaijs / deep-eql](https://github.com/chaijs/deep-eql): Improved deep equality testing for Node.js and the browser.
  148. - [chaijs / type-detect](https://github.com/chaijs/type-detect): Improved typeof detection for Node.js and the browser.
  149. - [chaijs / check-error](https://github.com/chaijs/check-error): Error comparison and information related utility for Node.js and the browser.
  150. - [chaijs / loupe](https://github.com/chaijs/loupe): Inspect utility for Node.js and browsers.
  151. - [chaijs / pathval](https://github.com/chaijs/pathval): Object value retrieval given a string path.
  152. - [chaijs / get-func-name](https://github.com/chaijs/get-func-name): Utility for getting a function's name for node and the browser.
  153. ### Contributing
  154. Thank you very much for considering to contribute!
  155. Please make sure you follow our [Code Of Conduct](https://github.com/chaijs/chai/blob/master/CODE_OF_CONDUCT.md) and we also strongly recommend reading our [Contributing Guide](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md).
  156. Here are a few issues other contributors frequently ran into when opening pull requests:
  157. - Please do not commit changes to the `chai.js` build. We do it once per release.
  158. - Before pushing your commits, please make sure you [rebase](https://github.com/chaijs/chai/blob/master/CONTRIBUTING.md#pull-requests) them.
  159. ### Contributors
  160. Please see the full
  161. [Contributors Graph](https://github.com/chaijs/chai/graphs/contributors) for our
  162. list of contributors.
  163. ### Core Contributors
  164. Feel free to reach out to any of the core contributors with your questions or
  165. concerns. We will do our best to respond in a timely manner.
  166. [![Jake Luer](https://avatars3.githubusercontent.com/u/58988?v=3&s=50)](https://github.com/logicalparadox)
  167. [![Veselin Todorov](https://avatars3.githubusercontent.com/u/330048?v=3&s=50)](https://github.com/vesln)
  168. [![Keith Cirkel](https://avatars3.githubusercontent.com/u/118266?v=3&s=50)](https://github.com/keithamus)
  169. [![Lucas Fernandes da Costa](https://avatars3.githubusercontent.com/u/6868147?v=3&s=50)](https://github.com/lucasfcosta)
  170. [![Grant Snodgrass](https://avatars3.githubusercontent.com/u/17260989?v=3&s=50)](https://github.com/meeber)