format jest calls like regular calls (#5011)
parent
0c7c1bfde4
commit
6288704c41
|
@ -5800,10 +5800,7 @@ function isTestCall(n, parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isUnitTestSetUp(n)) {
|
if (isUnitTestSetUp(n)) {
|
||||||
return (
|
return isAngularTestWrapper(n.arguments[0]);
|
||||||
isFunctionOrArrowExpression(n.arguments[0].type) ||
|
|
||||||
isAngularTestWrapper(n.arguments[0])
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
} else if (n.arguments.length === 2) {
|
} else if (n.arguments.length === 2) {
|
||||||
if (
|
if (
|
||||||
|
|
|
@ -5,10 +5,22 @@ beforeEach(async(() => {
|
||||||
// code
|
// code
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
beforeEach(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar(),
|
||||||
|
);
|
||||||
|
|
||||||
afterAll(async(() => {
|
afterAll(async(() => {
|
||||||
console.log('Hello');
|
console.log('Hello');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
afterAll(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar(),
|
||||||
|
);
|
||||||
|
|
||||||
it('should create the app', async(() => {
|
it('should create the app', async(() => {
|
||||||
//code
|
//code
|
||||||
}));
|
}));
|
||||||
|
@ -28,10 +40,22 @@ beforeEach(async(() => {
|
||||||
// code
|
// code
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
beforeEach(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar()
|
||||||
|
);
|
||||||
|
|
||||||
afterAll(async(() => {
|
afterAll(async(() => {
|
||||||
console.log("Hello");
|
console.log("Hello");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
afterAll(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar()
|
||||||
|
);
|
||||||
|
|
||||||
it("should create the app", async(() => {
|
it("should create the app", async(() => {
|
||||||
//code
|
//code
|
||||||
}));
|
}));
|
||||||
|
@ -56,10 +80,22 @@ beforeEach(async(() => {
|
||||||
// code
|
// code
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
beforeEach(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar(),
|
||||||
|
);
|
||||||
|
|
||||||
afterAll(async(() => {
|
afterAll(async(() => {
|
||||||
console.log('Hello');
|
console.log('Hello');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
afterAll(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar(),
|
||||||
|
);
|
||||||
|
|
||||||
it('should create the app', async(() => {
|
it('should create the app', async(() => {
|
||||||
//code
|
//code
|
||||||
}));
|
}));
|
||||||
|
@ -79,10 +115,22 @@ beforeEach(async(() => {
|
||||||
// code
|
// code
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
beforeEach((done) =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar()
|
||||||
|
);
|
||||||
|
|
||||||
afterAll(async(() => {
|
afterAll(async(() => {
|
||||||
console.log("Hello");
|
console.log("Hello");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
afterAll((done) =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar()
|
||||||
|
);
|
||||||
|
|
||||||
it("should create the app", async(() => {
|
it("should create the app", async(() => {
|
||||||
//code
|
//code
|
||||||
}));
|
}));
|
||||||
|
|
|
@ -2,10 +2,22 @@ beforeEach(async(() => {
|
||||||
// code
|
// code
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
beforeEach(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar(),
|
||||||
|
);
|
||||||
|
|
||||||
afterAll(async(() => {
|
afterAll(async(() => {
|
||||||
console.log('Hello');
|
console.log('Hello');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
afterAll(done =>
|
||||||
|
foo()
|
||||||
|
.bar()
|
||||||
|
.bar(),
|
||||||
|
);
|
||||||
|
|
||||||
it('should create the app', async(() => {
|
it('should create the app', async(() => {
|
||||||
//code
|
//code
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in New Issue