[ospec] make o.only noisier
This commit is contained in:
parent
6dd9394fef
commit
9b3e646303
2 changed files with 5 additions and 2 deletions
|
|
@ -18,7 +18,10 @@ module.exports = new function init() {
|
|||
predicate()
|
||||
ctx = parent
|
||||
}
|
||||
o.only = function(subject, predicate) {o(subject, only = predicate)}
|
||||
o.only = function(subject, predicate, silent) {
|
||||
if (!silent) console.log(highlight("/!\\ WARNING /!\\ o.only() mode"))
|
||||
o(subject, only = predicate)
|
||||
}
|
||||
o.spy = function(fn) {
|
||||
var spy = function() {
|
||||
spy.this = this
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ new function(o) {
|
|||
})
|
||||
o.only(".only()", function() {
|
||||
o(2).equals(2)
|
||||
})
|
||||
}, true)
|
||||
})
|
||||
|
||||
o.run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue