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

vhoyer / vue-prop-validation-helper / ebdc5aa1-2a58-4a8a-af77-09560db4f3bd

pending completion
ebdc5aa1-2a58-4a8a-af77-09560db4f3bd

Pull #42

circleci

GitHub
:arrow_up: Bump minimist and mkdirp in /playground
Pull Request #42: ⬆️ Bump minimist and mkdirp in /playground

8 of 8 branches covered (100.0%)

Branch coverage included in aggregate %.

39 of 39 relevant lines covered (100.0%)

5.67 hits per line

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

100.0
/src/validators/objectShouldHave.ts
1
import listMissingPropertiesFrom from '../helper/listMissingProperties';
3✔
2

3
function objectShouldHave(requiredProperties: string[]) {
4
  return (obj: object) => {
7✔
5
    const missingProperties = listMissingPropertiesFrom(obj, { requiredProperties });
6✔
6

7
    if (missingProperties.length) {
6✔
8
      console.error(
4✔
9
        'Object (', obj, ') is missing the following properties, which are all required:\n',
10
        ...missingProperties.map((prop) => `- ${prop}\n`),
5✔
11
      );
12

13
      return false;
4✔
14
    } else {
15
      return true;
2✔
16
    }
17
  };
18
}
19

20
export default objectShouldHave;
3✔
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

© 2026 Coveralls, Inc