https://github.com/bendc/simple-test
Basic testing library
https://github.com/bendc/simple-test
Last synced: 10 months ago
JSON representation
Basic testing library
- Host: GitHub
- URL: https://github.com/bendc/simple-test
- Owner: bendc
- License: mit
- Created: 2016-01-29T10:11:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-29T10:15:30.000Z (over 10 years ago)
- Last Synced: 2025-03-26T05:11:30.388Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Simple Test
Simple Test is a tiny, straightforward testing framework. It provides a single assertion model,
doesn't perform deep comparisons and uses [same-value
equality](http://ecma-international.org/ecma-262/5.1/#sec-9.12) for your tests.
## Getting Started
Set up your HTML document like this:
```html
Unit tests
```
Write tests in your `tests.js` file:
```javascript
test("My first test", assert => {
assert("".charAt(0), "", "returns an empty string");
assert([1, 2].map(n => n + 1), [2, 3], "increments each number in an array");
assert({ a: "1", b: "2" }, { a: 1, b: 2 }, "values should be numbers");
});
```
Result:
