jasmine-jquery icon indicating copy to clipboard operation
jasmine-jquery copied to clipboard

Can I create multiple elements using sandbox()

Open installero opened this issue 10 years ago • 1 comments

Tried both

setFixtures(sandbox({class:'First'}, {class:'Second'}));

and

setFixtures(sandbox([{class:'First'}, {class:'Second'}]));

None worked. Is there a way to create some complex stuff using sandbox?

installero avatar Oct 15 '14 16:10 installero

Not really, sandbox will create single div and pass provided attributes to that div as seen in code

  jasmine.Fixtures.prototype.sandbox = function (attributes) {
    var attributesToSet = attributes || {}
    return $('<div id="sandbox" />').attr(attributesToSet)
  }

husa avatar Mar 31 '15 11:03 husa