зеркало из https://github.com/mozilla/reflex.git
Move tests.
This commit is contained in:
Родитель
bf72b41d33
Коммит
33215eff5c
|
@ -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()
|
||||
}
|
||||
})
|
|
@ -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")
|
||||
})
|
Загрузка…
Ссылка в новой задаче