Files
test-repo/tests/format/js/test-declarations/angular_waitForAsync.js
T
Hendrik NijmeijerandHendrik Nijmeijer 846069b6c7 recognize waitForAsync as test-statement in Angular (#11992)
* recognize waitForAsync as test-statement in Angular

* Add changelog_unreleased entry

Co-authored-by: Hendrik Nijmeijer <hendrik@hendriknijmeijer.nl>
2021-12-20 17:04:19 -03:00

25 lines
739 B
JavaScript

beforeEach(waitForAsync(() => {
// code
}));
afterAll(waitForAsync(() => {
console.log('Hello');
}));
it('should create the app', waitForAsync(() => {
//code
}));
it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => {
// code
}));
it("does something really long and complicated so I have to write a very long name for the test", waitForAsync(() => 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() { waitForAsync(() => {}) }