prop and withAttr tests
This commit is contained in:
parent
477e73f300
commit
a2c01d1d96
4 changed files with 61 additions and 1 deletions
16
util/tests/test-prop.js
Normal file
16
util/tests/test-prop.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"use strict"
|
||||
|
||||
var o = require("../../ospec/ospec")
|
||||
var prop = require("../../util/prop")
|
||||
|
||||
o.spec("prop", function() {
|
||||
o("works", function() {
|
||||
var store = prop(1)
|
||||
var initialValue = store()
|
||||
store(2)
|
||||
var newValue = store()
|
||||
|
||||
o(initialValue).equals(1)
|
||||
o(newValue).equals(2)
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue