expect = chai.expect
pause_msec = 1
timeout_msec = 0
ask = false
int = (s) ->
expect = chai.expect
pause_msec = 1
timeout_msec = 0
ask = false
int = (s) ->
console.log(“int(#{s})”)
if s
return Math.round(s.replace("px",''))
beep()
throw "int(#{s}) expects a value"
halt = () ->
expect(undefined, "").to.be.ok()
describe "NooDBBrowser tests", () ->
@timeout(timeout_msec)
@bail(true)
before () ->
after () =>
beforeEach () ->
test_title = this.currentTest.title
console.groupCollapsed(test_title);
@fp = new FractalPanel "body", "TEST: " + test_title,
make_frame: true
propagate:
always_show_NEWS_buttons: true
color_panels_uniquely: true
inject_tree_path: true
suppress_corner_buttons: false
suppress_content_area: false
show_NEWS_handle:
E: true
S: true
N: true
W: true
afterEach (done) ->
if @currentTest.state is 'failed'
beep()
console.log “CURRENT:”,@currentTest
if ask or @currentTest.pause
msg = @currentTest.pause + "\n\nContinue?"
if not confirm(msg)
@halt_and_catch_fire = true
if @halt_and_catch_fire
@intentionally.halt_and_catch_fire
else
setTimeout(() =>
delete @fp
FractalPanel.color_idx = 0
FractalPanel.last_ids = {}
$(".split-pane-frame").remove()
done()
console.groupEnd()
, pause_msec)
describe "loading", () ->
it "should be locally available", () ->
halt()