Sha256: f243330617ce11a3214cf114bf9687b2f928ee0fb2af527f45e55985393e9d5a

Contents?: true

Size: 744 Bytes

Versions: 55

Compression:

Stored size: 744 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(j$.pp(bigObject)).toMatch(/cycle/);
  });
});

Version data entries

55 entries across 55 versions & 4 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/bootstrap-tagsinput/lib/jasmine/spec/performance/large_object_test.js
tdiary-5.0.2 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/performance/large_object_test.js
tdiary-5.0.1 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.4.1 ./lib/jasmine-core/spec/performance/large_object_test.js
jasmine-core-2.4.0 ./lib/jasmine-core/spec/performance/large_object_test.js
upjs-rails-0.11.0 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.10.5 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.10.4 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.10.3 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.10.2 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.10.1 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.10.0 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.9.1 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.9.0 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.8.2 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.8.1 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.8.0 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.7.8 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.7.7 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js
upjs-rails-0.7.6 spec_app/vendor/assets/bower_components/jasmine/spec/performance/large_object_test.js