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

LouisBrunner / dnd-multi-backend / 5512466585

pending completion
5512466585

Pull #135

github

web-flow
Merge 21f040e86 into b6eb3c04b
Pull Request #135: chore(deps-dev): bump jest-environment-jsdom from 29.5.0 to 29.6.1

63 of 67 branches covered (94.03%)

Branch coverage included in aggregate %.

264 of 265 relevant lines covered (99.62%)

37.2 hits per line

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

100.0
/packages/dnd-multi-backend/src/PreviewListImpl.ts
1
import {MultiBackendSwitcher, PreviewList, PreviewListener} from './types'
135✔
2

3
export class PreviewListImpl implements PreviewList {
4
  /*private*/ #previews: PreviewListener[]
111✔
5

6
  constructor() {
7
    this.#previews = []
99✔
8
  }
9

10
  register = (preview: PreviewListener): void => {
99✔
11
    this.#previews.push(preview)
15✔
12
  }
13

14
  unregister = (preview: PreviewListener): void => {
99✔
15
    let index
16
    while ((index = this.#previews.indexOf(preview)) !== -1) {
12✔
17
      this.#previews.splice(index, 1)
12✔
18
    }
19
  }
20

21
  backendChanged = (backend: MultiBackendSwitcher): void => {
99✔
22
    for (const preview of this.#previews) {
33✔
23
      preview.backendChanged(backend)
18✔
24
    }
25
  }
26
}
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