add prettier and eslint
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
describe('Printing a big object', function(){
|
||||
describe('Printing a big object', function() {
|
||||
var bigObject;
|
||||
function rand(upper) {
|
||||
return Math.round(upper * Math.random());
|
||||
@@ -11,26 +11,24 @@ describe('Printing a big object', function(){
|
||||
var decide = rand(2);
|
||||
switch (decide) {
|
||||
case 0:
|
||||
object["cycle" + i] = object;
|
||||
break;
|
||||
object['cycle' + i] = object;
|
||||
break;
|
||||
case 1:
|
||||
object["number" + i] = rand(100);
|
||||
break;
|
||||
object['number' + i] = rand(100);
|
||||
break;
|
||||
case 2:
|
||||
if (level < 3) {
|
||||
object["nesting" + i] = generateObject(level + 1);
|
||||
}
|
||||
break;
|
||||
object['nesting' + i] = generateObject(level + 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
it('takes a reasonable amount of time', function(){
|
||||
it('takes a reasonable amount of time', function() {
|
||||
bigObject = generateObject(0);
|
||||
expect(jasmineUnderTest.pp(bigObject)).toMatch(/cycle/);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
describe("performance", function() {
|
||||
describe('performance', function() {
|
||||
for (var i = 0; i < 10000; i++) {
|
||||
it("should pass", function() {
|
||||
it('should pass', function() {
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
it("should fail", function() {
|
||||
it('should fail', function() {
|
||||
expect(true).toBe(false);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user