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

CenterForOpenScience / ember-osf-web / 16118219201

07 Jul 2025 01:24PM UTC coverage: 67.207% (-0.2%) from 67.382%
16118219201

Pull #2595

github

web-flow
Merge 0da7bb715 into 186fd8065
Pull Request #2595: [ENG-6835] [ENG-8060] [ENG-8289] VRL Project PR - FE

3275 of 5343 branches covered (61.3%)

Branch coverage included in aggregate %.

40 of 112 new or added lines in 16 files covered. (35.71%)

3 existing lines in 1 file now uncovered.

8536 of 12231 relevant lines covered (69.79%)

184.39 hits per line

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

64.29
/app/helpers/instance-of.ts
1
import { getOwner } from '@ember/application';
2
import { assert } from '@ember/debug';
3

4
import Helper from '@ember/component/helper';
5

6
export default class InstanceOf extends Helper {
7
    compute([object, className]: [any, string]) {
8
        if (!object || typeof className !== 'string') {
1!
NEW
9
            return false;
×
10
        }
11
        // Look up the class from the container
12
        const owner = getOwner(this);
1✔
13
        const klass = owner.factoryFor(`model:${className}`)?.class;
1✔
14
        if (!klass) {
1!
NEW
15
            assert(`Class "${className}" not found`);
×
NEW
16
            return false;
×
17
        }
18
        return object instanceof klass;
1✔
19
    }
20
}
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