@f5devcentral/atg-shared-utilities-dev
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -15,2 +15,13 @@ # Changelog | ||
## [0.2.7] = 2022-07-27 | ||
### Added | ||
- checkAndDeleteProperty function for use in testing | ||
### Fixed | ||
### Changed | ||
- Update packages | ||
### Removed | ||
## [0.2.6] - 2022-05-03 | ||
@@ -17,0 +28,0 @@ ### Changed |
{ | ||
"name": "@f5devcentral/atg-shared-utilities-dev", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"scripts": { | ||
"lint": "eslint ." | ||
"lint": "eslint .", | ||
"test": "mocha test/unit/ --recursive", | ||
"coverage": "nyc npm test" | ||
}, | ||
"devDependencies": { | ||
"@f5devcentral/eslint-config-f5-atg": "^0.1.7", | ||
"eslint": "^7.32.0" | ||
"eslint": "^7.32.0", | ||
"nyc": "^15.1.0", | ||
"mocha": "^10.0.0" | ||
}, | ||
@@ -17,5 +21,21 @@ "eslintConfig": { | ||
}, | ||
"dependencies": {}, | ||
"nyc": { | ||
"reporter": [ | ||
"html", | ||
"text", | ||
"json-summary" | ||
], | ||
"exclude": [ | ||
"gulpfile.js", | ||
"coverage/**", | ||
"test/**", | ||
"**/node_modules/**", | ||
"**/dist/**" | ||
] | ||
}, | ||
"description": "This project holds a number of generic utility functions that can be shared across the F5 Automation Toolchain projects.", | ||
"main": "index.js", | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"repository": { | ||
@@ -22,0 +42,0 @@ "type": "git", |
@@ -9,2 +9,25 @@ # atg-shared-utilities-dev | ||
## checkAndDelete | ||
These are quick functions, which checks to see if a property exists in an object, then if it is of the specified type, and finally deletes it. It was designed for use in testing properties with random values within arrays of objects. | ||
By checking for their existance and then deleting them, the user can then use `assert.strictDeepEquals(...)` more reliably. | ||
### property(objectArray, propertyToCheck, expectedPropertyType, options) | ||
This takes in an array of objects, checks each object for the property, checks the property's type against the expected value, and then deletes the property from the object. | ||
Note: propertyToCheck is handled as a literal, and so paths do not work. | ||
#### options | ||
These are optional values that do NOT need to be included in the method call. | ||
#### options.skipUndefinedProperties | ||
This option accepts one of the following strings. | ||
- "MIN0": Skips check if an object[propertyToCheck] is undefined. Formerly the `isMissingProp`. | ||
- "MIN1": Skips check if an object[propertyToCheck] is undefined, but Errors if ALL object[propertyToCheck] are undefined. | ||
## SCRIPTS | ||
@@ -11,0 +34,0 @@ |
/** | ||
* Copyright 2021 F5 Networks, Inc. | ||
* Copyright 2022 F5 Networks, Inc. | ||
* | ||
@@ -4,0 +4,0 @@ * Licensed under the Apache License, Version 2.0 (the "License"); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42486
12
622
62
4
1