@stylable/core-test-kit
Advanced tools
Comparing version 3.5.0 to 3.5.2
@@ -11,3 +11,3 @@ "use strict"; | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
} | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -14,0 +14,0 @@ __exportStar(require("./diagnostics"), exports); |
{ | ||
"name": "@stylable/core-test-kit", | ||
"version": "3.5.0", | ||
"version": "3.5.2", | ||
"description": "Stylable core test-kit", | ||
@@ -14,3 +14,3 @@ "main": "./cjs/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^3.5.0", | ||
"@stylable/core": "^3.5.2", | ||
"chai": "^4.2.0", | ||
@@ -17,0 +17,0 @@ "flat": "^5.0.0", |
@@ -10,3 +10,5 @@ # @stylable/core-test-kit | ||
#### Matchers | ||
An assortment of `Chai` matchers used by Stylable. | ||
- `flat-match` - flattens and matches passed arguments | ||
@@ -24,5 +26,7 @@ - `results` - test Stylable transpiled style rules output | ||
#### Match rules | ||
Exposes two utility functions (`matchRuleAndDeclaration` and `matchAllRulesAndDeclarations`) used for testing Stylable generated AST representing CSS rules and declarations. | ||
## License | ||
Copyright (c) 2019 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a [BSD license](./LICENSE). | ||
Copyright (c) 2019 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by a [BSD license](./LICENSE). |
@@ -6,5 +6,5 @@ import { expect } from 'chai'; | ||
const { flag } = util; | ||
chai.Assertion.addMethod('flatMatch', function (obj: {}, maxDepth = 5) { | ||
chai.Assertion.addMethod('flatMatch', function (obj: Record<string, unknown>, maxDepth = 5) { | ||
expect(flatten(flag(this, 'object'), { maxDepth })).to.contain(flatten(obj)); | ||
}); | ||
} |
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
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
51548
31
Updated@stylable/core@^3.5.2