This commit is contained in:
Irakli Gozalishvili 2017-06-26 11:22:15 -07:00
Родитель bf72b41d33
Коммит 33215eff5c
4 изменённых файлов: 26 добавлений и 35 удалений

4
.gitignore поставляемый
Просмотреть файл

@ -3,4 +3,6 @@ dist
**/*.js
**/*.flow
!src/**/*.js
!src/**/*.flow
!src/**/*.flow
!test/**/*.js
!test/**/*.flow

Просмотреть файл

@ -1,24 +0,0 @@
import test from "./test"
import * as Reflex from "../"
test("test exported api", assert => {
assert.ok(typeof(Reflex.node), "function")
assert.ok(typeof(Reflex.html), "object")
assert.ok(typeof(Reflex.html.div), "function")
assert.ok(typeof(Reflex.thunk), "function")
assert.ok(typeof(Reflex.send), "function")
assert.ok(typeof(Reflex.forward), "function")
assert.ok(typeof(Reflex.Application), "function")
assert.ok(typeof(Reflex.Task.succeed), "function")
assert.ok(typeof(Reflex.Task.fail), "function")
assert.ok(typeof(Reflex.Task.io), "function")
assert.ok(typeof(Reflex.Task.onSuccess), "function")
assert.ok(typeof(Reflex.Task.onFailure), "function")
assert.ok(typeof(Reflex.Task.perform), "function")
assert.ok(typeof(Reflex.Task.run), "function")
})

Просмотреть файл

@ -1,10 +0,0 @@
import * as tape from "tape"
export default (description, unit) => tape.test(description, test => {
var result = unit(test)
if (result && result.then) {
result.then(_ => test.end(), error => test.end(error || true))
} else {
test.end()
}
})

23
test/test-api.js Normal file
Просмотреть файл

@ -0,0 +1,23 @@
import test from "blue-tape"
import * as Reflex from "../"
test("test exported api", async assert => {
assert.ok(typeof Reflex.node, "function")
assert.ok(typeof Reflex.html, "object")
assert.ok(typeof Reflex.html.div, "function")
assert.ok(typeof Reflex.thunk, "function")
assert.ok(typeof Reflex.send, "function")
assert.ok(typeof Reflex.forward, "function")
assert.ok(typeof Reflex.Application, "function")
assert.ok(typeof Reflex.Task.succeed, "function")
assert.ok(typeof Reflex.Task.fail, "function")
assert.ok(typeof Reflex.Task.io, "function")
assert.ok(typeof Reflex.Task.onSuccess, "function")
assert.ok(typeof Reflex.Task.onFailure, "function")
assert.ok(typeof Reflex.Task.perform, "function")
assert.ok(typeof Reflex.Task.run, "function")
})