Sha256: 04a9ce28382e74dfbdeec4cceff986c1c3f3e7164d14573b1225cd3ccaad4da6

Contents?: true

Size: 758 Bytes

Versions: 23

Compression:

Stored size: 758 Bytes

Contents

describe('Printing a big object', function(){
  var bigObject;
  function rand(upper) {
    return Math.round(upper * Math.random());
  }

  function generateObject(level) {
    var object = {};

    for (var i = 0; i < 50; i++) {
      var decide = rand(2);
      switch (decide) {
        case 0:
          object["cycle" + i] = object;
        break;
        case 1:
          object["number" + i] = rand(100);
        break;
        case 2:
          if (level < 3) {
          object["nesting" + i] = generateObject(level + 1);
        }
        break;
      }

    }

    return object;
  }

  it('takes a resonable amount of time', function(){
    bigObject = generateObject(0);
    expect(jasmineUnderTest.pp(bigObject)).toMatch(/cycle/);
  });
});

Version data entries

23 entries across 20 versions & 2 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.99.1 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-3.0.0 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.99.0 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.9.1 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.9.0 ./lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.7 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.6 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.8.0 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.7.0 ./lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.3/lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.4/lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.6.4 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.6.3 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.6.2 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.6.1 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.6.0 ./lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.4 vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/performance/large_object_test.js