prettier/tests/test_declarations/__snapshots__/jsfmt.spec.js.snap

1289 lines
38 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`angular_async.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
beforeEach(async(() => {
// code
}));
beforeEach(done =>
foo()
.bar()
.bar(),
);
afterAll(async(() => {
console.log('Hello');
}));
afterAll(done =>
foo()
.bar()
.bar(),
);
it('should create the app', async(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", async(() => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() { async(() => {}) }
=====================================output=====================================
beforeEach(async(() => {
// code
}));
beforeEach(done =>
foo()
.bar()
.bar()
);
afterAll(async(() => {
console.log("Hello");
}));
afterAll(done =>
foo()
.bar()
.bar()
);
it("should create the app", async(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", async(() => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() {
async(() => {});
}
================================================================================
`;
exports[`angular_async.js 2`] = `
====================================options=====================================
arrowParens: "always"
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
beforeEach(async(() => {
// code
}));
beforeEach(done =>
foo()
.bar()
.bar(),
);
afterAll(async(() => {
console.log('Hello');
}));
afterAll(done =>
foo()
.bar()
.bar(),
);
it('should create the app', async(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", async(() => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() { async(() => {}) }
=====================================output=====================================
beforeEach(async(() => {
// code
}));
beforeEach((done) =>
foo()
.bar()
.bar()
);
afterAll(async(() => {
console.log("Hello");
}));
afterAll((done) =>
foo()
.bar()
.bar()
);
it("should create the app", async(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", async(() => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() {
async(() => {});
}
================================================================================
`;
exports[`angular_fakeAsync.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
beforeEach(fakeAsync(() => {
// code
}));
afterAll(fakeAsync(() => {
console.log('Hello');
}));
it('should create the app', fakeAsync(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() { fakeAsync(() => {}) }
=====================================output=====================================
beforeEach(fakeAsync(() => {
// code
}));
afterAll(fakeAsync(() => {
console.log("Hello");
}));
it("should create the app", fakeAsync(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() =>
new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS()));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() {
fakeAsync(() => {});
}
================================================================================
`;
exports[`angular_fakeAsync.js 2`] = `
====================================options=====================================
arrowParens: "always"
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
beforeEach(fakeAsync(() => {
// code
}));
afterAll(fakeAsync(() => {
console.log('Hello');
}));
it('should create the app', fakeAsync(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() { fakeAsync(() => {}) }
=====================================output=====================================
beforeEach(fakeAsync(() => {
// code
}));
afterAll(fakeAsync(() => {
console.log("Hello");
}));
it("should create the app", fakeAsync(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", fakeAsync(() =>
new SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS()));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() {
fakeAsync(() => {});
}
================================================================================
`;
exports[`angularjs_inject.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
beforeEach(inject(($fooService, $barService) => {
// code
}));
afterAll(inject(($fooService, $barService) => {
console.log('Hello');
}));
it('should create the app', inject(($fooService, $barService) => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() { inject(() => {}) }
=====================================output=====================================
beforeEach(inject(($fooService, $barService) => {
// code
}));
afterAll(inject(($fooService, $barService) => {
console.log("Hello");
}));
it("should create the app", inject(($fooService, $barService) => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject((
$fooServiceLongName,
$barServiceLongName
) => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() {
inject(() => {});
}
================================================================================
`;
exports[`angularjs_inject.js 2`] = `
====================================options=====================================
arrowParens: "always"
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
beforeEach(inject(($fooService, $barService) => {
// code
}));
afterAll(inject(($fooService, $barService) => {
console.log('Hello');
}));
it('should create the app', inject(($fooService, $barService) => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject(($fooServiceLongName, $barServiceLongName) => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() { inject(() => {}) }
=====================================output=====================================
beforeEach(inject(($fooService, $barService) => {
// code
}));
afterAll(inject(($fooService, $barService) => {
console.log("Hello");
}));
it("should create the app", inject(($fooService, $barService) => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", inject((
$fooServiceLongName,
$barServiceLongName
) => {
// code
}));
/*
* isTestCall(parent) should only be called when parent exists
* and parent.type is CallExpression. This test makes sure that
* no errors are thrown when calling isTestCall(parent)
*/
function x() {
inject(() => {});
}
================================================================================
`;
exports[`jest-each.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
describe.each\`
a|b|expected
\${11 } | \${ 1 }|\${222}
\${1-1}|\${2+2}|\${ 3333}
\${2+1+2}|\${1111}|\${3}
\`('$a + $b', ({a, b, expected}) => {
test(\`returns \${expected}\`, () => {
expect(a + b).toBe(expected);
});
test(\`returned value not be greater than \${expected}\`, () => {
expect(a + b).not.toBeGreaterThan(expected);
});
test(\`returned value not be less than \${expected}\`, () => {
expect(a + b).not.toBeLessThan(expected);
});
});
describe.only.each\`
a|b|expected
\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'}
\${1-1}|\${2+2}|\${ 3333}
\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'}
\`
describe.only.each\`
||
\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'}
\${1-1}|\${2+2}|\${ 3333}
\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'}
\`
describe.each\`a | b | expected
\${1} | \${1} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}\`
// an example to demo multiline quasi
describe.each\`a | b | expected
\${11111111111} | \${a().b().c().d()} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}\`
describe.each([1, 2, 3])("test", a => {
expect(a).toBe(a);
});
test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)", (a, b, expected) => {
expect(a + b).toBe(expected);
}
);
test.each([
{ a: "1", b: 1 },
{ a: "2", b: 2 },
{ a: "3", b: 3 },
])("test", ({ a, b }) => {
expect(Number(a)).toBe(b);
}
);
=====================================output=====================================
describe.each\`
a | b | expected
\${11} | \${1} | \${222}
\${1 - 1} | \${2 + 2} | \${3333}
\${2 + 1 + 2} | \${1111} | \${3}
\`("$a + $b", ({ a, b, expected }) => {
test(\`returns \${expected}\`, () => {
expect(a + b).toBe(expected);
});
test(\`returned value not be greater than \${expected}\`, () => {
expect(a + b).not.toBeGreaterThan(expected);
});
test(\`returned value not be less than \${expected}\`, () => {
expect(a + b).not.toBeLessThan(expected);
});
});
describe.only.each\`
a | b | expected
\${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"}
\${1 - 1} | \${2 + 2} | \${3333}
\${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"}
\`;
describe.only.each\`
| |
\${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"}
\${1 - 1} | \${2 + 2} | \${3333}
\${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"}
\`;
describe.each\`
a | b | expected
\${1} | \${1} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}
\`;
// an example to demo multiline quasi
describe.each\`
a | b | expected
\${11111111111} | \${a()
.b()
.c()
.d()} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}
\`;
describe.each([1, 2, 3])("test", a => {
expect(a).toBe(a);
});
test.only.each([
[1, 1, 2],
[1, 2, 3],
[2, 1, 3]
])(".add(%i, %i)", (a, b, expected) => {
expect(a + b).toBe(expected);
});
test.each([
{ a: "1", b: 1 },
{ a: "2", b: 2 },
{ a: "3", b: 3 }
])("test", ({ a, b }) => {
expect(Number(a)).toBe(b);
});
================================================================================
`;
exports[`jest-each.js 2`] = `
====================================options=====================================
arrowParens: "always"
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
describe.each\`
a|b|expected
\${11 } | \${ 1 }|\${222}
\${1-1}|\${2+2}|\${ 3333}
\${2+1+2}|\${1111}|\${3}
\`('$a + $b', ({a, b, expected}) => {
test(\`returns \${expected}\`, () => {
expect(a + b).toBe(expected);
});
test(\`returned value not be greater than \${expected}\`, () => {
expect(a + b).not.toBeGreaterThan(expected);
});
test(\`returned value not be less than \${expected}\`, () => {
expect(a + b).not.toBeLessThan(expected);
});
});
describe.only.each\`
a|b|expected
\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'}
\${1-1}|\${2+2}|\${ 3333}
\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'}
\`
describe.only.each\`
||
\${11 } | \${ 1 }|\${222}|\${'unknown column 1'}|\${'unknown column 2'}
\${1-1}|\${2+2}|\${ 3333}
\${2+1+2}|\${1111}|\${3} |\${'unknown column xyz'}
\`
describe.each\`a | b | expected
\${1} | \${1} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}\`
// an example to demo multiline quasi
describe.each\`a | b | expected
\${11111111111} | \${a().b().c().d()} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}\`
describe.each([1, 2, 3])("test", a => {
expect(a).toBe(a);
});
test.only.each([[1, 1, 2], [1, 2, 3], [2, 1, 3]])(
".add(%i, %i)", (a, b, expected) => {
expect(a + b).toBe(expected);
}
);
test.each([
{ a: "1", b: 1 },
{ a: "2", b: 2 },
{ a: "3", b: 3 },
])("test", ({ a, b }) => {
expect(Number(a)).toBe(b);
}
);
=====================================output=====================================
describe.each\`
a | b | expected
\${11} | \${1} | \${222}
\${1 - 1} | \${2 + 2} | \${3333}
\${2 + 1 + 2} | \${1111} | \${3}
\`("$a + $b", ({ a, b, expected }) => {
test(\`returns \${expected}\`, () => {
expect(a + b).toBe(expected);
});
test(\`returned value not be greater than \${expected}\`, () => {
expect(a + b).not.toBeGreaterThan(expected);
});
test(\`returned value not be less than \${expected}\`, () => {
expect(a + b).not.toBeLessThan(expected);
});
});
describe.only.each\`
a | b | expected
\${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"}
\${1 - 1} | \${2 + 2} | \${3333}
\${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"}
\`;
describe.only.each\`
| |
\${11} | \${1} | \${222} | \${"unknown column 1"} | \${"unknown column 2"}
\${1 - 1} | \${2 + 2} | \${3333}
\${2 + 1 + 2} | \${1111} | \${3} | \${"unknown column xyz"}
\`;
describe.each\`
a | b | expected
\${1} | \${1} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}
\`;
// an example to demo multiline quasi
describe.each\`
a | b | expected
\${11111111111} | \${a()
.b()
.c()
.d()} | \${2}
\${1} | \${2} | \${3}
\${2} | \${1} | \${3}
\`;
describe.each([1, 2, 3])("test", (a) => {
expect(a).toBe(a);
});
test.only.each([
[1, 1, 2],
[1, 2, 3],
[2, 1, 3]
])(".add(%i, %i)", (a, b, expected) => {
expect(a + b).toBe(expected);
});
test.each([
{ a: "1", b: 1 },
{ a: "2", b: 2 },
{ a: "3", b: 3 }
])("test", ({ a, b }) => {
expect(Number(a)).toBe(b);
});
================================================================================
`;
exports[`test_declarations.js 1`] = `
====================================options=====================================
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
// Shouldn't break
it("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function() {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function(done) {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) {
console.log("hello!");
});
it(\`does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
})
test("does something really long and complicated so I have to write a very long name for the test", (done) => {
console.log("hello!");
});
test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => {
console.log("hello!");
});
test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => {
console.log("hello!");
});
describe("does something really long and complicated so I have to write a very long name for the describe block", () => {
it("an example test", (done) => {
console.log("hello!");
});
});
describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => {
it(\`an example test\`, (done) => {
console.log("hello!");
});
});
xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
fit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
it.only("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
});
it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
skip("does something really long and complicated so I have to write a very long name for the test", () => {});
// Should break
it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => {
console.log("hello!");
});
it.only.only("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => {
console.log("hello!");
});
xskip("does something really long and complicated so I have to write a very long name for the test", () => {});
// timeout
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
}, 2500)
it("does something quick", () => {
console.log("hello!")
}, 1000000000)
it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10))
);
it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10)),
250
);
=====================================output=====================================
// Shouldn't break
it("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function() {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function(done) {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) {
console.log("hello!");
});
it(\`does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
});
test("does something really long and complicated so I have to write a very long name for the test", done => {
console.log("hello!");
});
test(\`does something really long and complicated so I have to write a very long name for the test\`, done => {
console.log("hello!");
});
test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => {
console.log("hello!");
});
describe("does something really long and complicated so I have to write a very long name for the describe block", () => {
it("an example test", done => {
console.log("hello!");
});
});
describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => {
it(\`an example test\`, done => {
console.log("hello!");
});
});
xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
fit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
it.only("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
});
it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
skip("does something really long and complicated so I have to write a very long name for the test", () => {});
// Should break
it.only(
"does something really long and complicated so I have to write a very long name for the test",
10,
() => {
console.log("hello!");
}
);
it.only.only(
"does something really long and complicated so I have to write a very long name for the test",
() => {
console.log("hello!");
}
);
it.only.only(
"does something really long and complicated so I have to write a very long name for the test",
(a, b, c) => {
console.log("hello!");
}
);
xskip(
"does something really long and complicated so I have to write a very long name for the test",
() => {}
);
// timeout
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
}, 2500);
it("does something quick", () => {
console.log("hello!");
}, 1000000000);
it("succeeds if the test finishes in time", () =>
new Promise(resolve => setTimeout(resolve, 10)));
it(
"succeeds if the test finishes in time",
() => new Promise(resolve => setTimeout(resolve, 10)),
250
);
================================================================================
`;
exports[`test_declarations.js 2`] = `
====================================options=====================================
arrowParens: "always"
parsers: ["flow", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
// Shouldn't break
it("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function() {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function(done) {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) {
console.log("hello!");
});
it(\`does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
})
test("does something really long and complicated so I have to write a very long name for the test", (done) => {
console.log("hello!");
});
test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => {
console.log("hello!");
});
test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => {
console.log("hello!");
});
describe("does something really long and complicated so I have to write a very long name for the describe block", () => {
it("an example test", (done) => {
console.log("hello!");
});
});
describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => {
it(\`an example test\`, (done) => {
console.log("hello!");
});
});
xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
fit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
it.only("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
});
it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
skip("does something really long and complicated so I have to write a very long name for the test", () => {});
// Should break
it.only("does something really long and complicated so I have to write a very long name for the test", 10, () => {
console.log("hello!");
});
it.only.only("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it.only.only("does something really long and complicated so I have to write a very long name for the test", (a, b, c) => {
console.log("hello!");
});
xskip("does something really long and complicated so I have to write a very long name for the test", () => {});
// timeout
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
}, 2500)
it("does something quick", () => {
console.log("hello!")
}, 1000000000)
it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10))
);
it(
'succeeds if the test finishes in time',
() => new Promise(resolve => setTimeout(resolve, 10)),
250
);
=====================================output=====================================
// Shouldn't break
it("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function() {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function(done) {
console.log("hello!");
});
it("does something really long and complicated so I have to write a very long name for the test", function myAssertions(done) {
console.log("hello!");
});
it(\`does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`{foo + bar} does something really long and complicated so I have to write a very long name for the test\`, function() {
console.log("hello!");
});
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
});
test("does something really long and complicated so I have to write a very long name for the test", (done) => {
console.log("hello!");
});
test(\`does something really long and complicated so I have to write a very long name for the test\`, (done) => {
console.log("hello!");
});
test("does something really long and complicated so I have to write a very long name for the test", <T>(done) => {
console.log("hello!");
});
describe("does something really long and complicated so I have to write a very long name for the describe block", () => {
it("an example test", (done) => {
console.log("hello!");
});
});
describe(\`does something really long and complicated so I have to write a very long name for the describe block\`, () => {
it(\`an example test\`, (done) => {
console.log("hello!");
});
});
xdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
fdescribe("does something really long and complicated so I have to write a very long name for the describe block", () => {});
describe.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
describe.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
fit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xit("does something really long and complicated so I have to write a very long name for the describe block", () => {});
it.only("does something really long and complicated so I have to write a very long name for the test", () => {
console.log("hello!");
});
it.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
});
it.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.only(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
test.skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
ftest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
xtest("does something really long and complicated so I have to write a very long name for the describe block", () => {});
skip(\`does something really long and complicated so I have to write a very long name for the test\`, () => {});
skip("does something really long and complicated so I have to write a very long name for the test", () => {});
// Should break
it.only(
"does something really long and complicated so I have to write a very long name for the test",
10,
() => {
console.log("hello!");
}
);
it.only.only(
"does something really long and complicated so I have to write a very long name for the test",
() => {
console.log("hello!");
}
);
it.only.only(
"does something really long and complicated so I have to write a very long name for the test",
(a, b, c) => {
console.log("hello!");
}
);
xskip(
"does something really long and complicated so I have to write a very long name for the test",
() => {}
);
// timeout
it(\`handles
some
newlines
does something really long and complicated so I have to write a very long name for the test\`, () => {
console.log("hello!");
}, 2500);
it("does something quick", () => {
console.log("hello!");
}, 1000000000);
it("succeeds if the test finishes in time", () =>
new Promise((resolve) => setTimeout(resolve, 10)));
it(
"succeeds if the test finishes in time",
() => new Promise((resolve) => setTimeout(resolve, 10)),
250
);
================================================================================
`;