add readme and package.json
This commit is contained in:
parent
96ce863f7f
commit
aafe014252
2 changed files with 37 additions and 7 deletions
32
README.md
Normal file
32
README.md
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# folktest
|
||||||
|
a simple test kit for myself and anyone else who doesn't feel like using jest or mocha or carrot or whatever the fuck its called
|
||||||
|
|
||||||
|
# Usage
|
||||||
|
```js
|
||||||
|
import { it, assert } from 'folktest'
|
||||||
|
|
||||||
|
const test = it('should pass', () => {
|
||||||
|
assert(true)
|
||||||
|
})
|
||||||
|
|
||||||
|
test()
|
||||||
|
/* {
|
||||||
|
* success: true,
|
||||||
|
* description: 'should pass',
|
||||||
|
* error: undefined
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
|
||||||
|
const err = it('should error', () => {
|
||||||
|
assert(false)
|
||||||
|
})
|
||||||
|
|
||||||
|
err()
|
||||||
|
/* {
|
||||||
|
* success: false,
|
||||||
|
* description: 'should error',
|
||||||
|
* error: AssertionError('assertion error: false is not true')
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
```
|
||||||
|
|
12
package.json
12
package.json
|
@ -1,12 +1,10 @@
|
||||||
{
|
{
|
||||||
"name": "folktest",
|
"name": "folktest",
|
||||||
|
"author": "Rowan <rowan@kitsu.cafe> (https://kitsu.cafe)",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"scripts": { },
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"keywords": ["test"],
|
||||||
},
|
"license": "GPL-3.0-or-later",
|
||||||
"keywords": [],
|
|
||||||
"author": "",
|
|
||||||
"license": "ISC",
|
|
||||||
"description": ""
|
"description": ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue