• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

typeorm / typeorm / 15219332477

23 May 2025 09:13PM UTC coverage: 17.216% (-59.1%) from 76.346%
15219332477

Pull #11332

github

naorpeled
cr comments - move if block
Pull Request #11332: feat: add new undefined and null behavior flags

1603 of 12759 branches covered (12.56%)

Branch coverage included in aggregate %.

0 of 31 new or added lines in 3 files covered. (0.0%)

14132 existing lines in 166 files now uncovered.

4731 of 24033 relevant lines covered (19.69%)

60.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

7.69
/src/query-runner/QueryLock.ts
1
export class QueryLock {
1✔
UNCOV
2
    private readonly queue: Promise<void>[] = []
×
3

4
    async acquire(): Promise<() => void> {
5
        let release: Function
UNCOV
6
        const waitingPromise = new Promise<void>((ok) => (release = ok))
×
7

8
        // Get track of everyone we need to wait on..
UNCOV
9
        const otherWaitingPromises = [...this.queue]
×
10
        // Put ourselves onto the end of the queue
UNCOV
11
        this.queue.push(waitingPromise)
×
12

UNCOV
13
        if (otherWaitingPromises.length > 0) {
×
UNCOV
14
            await Promise.all(otherWaitingPromises)
×
15
        }
16

UNCOV
17
        return () => {
×
UNCOV
18
            release()
×
19

UNCOV
20
            if (this.queue.includes(waitingPromise)) {
×
UNCOV
21
                this.queue.splice(this.queue.indexOf(waitingPromise), 1)
×
22
            }
23
        }
24
    }
25
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc