@stylable/core-test-kit
Advanced tools
Comparing version 3.1.1 to 3.1.3
@@ -1,2 +0,3 @@ | ||
export declare function flatMatch(chai: any, util: any): void; | ||
/// <reference types="chai" /> | ||
export declare function flatMatch(chai: Chai.ChaiStatic, util: Chai.ChaiUtils): void; | ||
//# sourceMappingURL=flat-match.d.ts.map |
{ | ||
"name": "@stylable/core-test-kit", | ||
"version": "3.1.1", | ||
"version": "3.1.3", | ||
"description": "Stylable core test-kit", | ||
@@ -14,3 +14,3 @@ "main": "./cjs/index.js", | ||
"dependencies": { | ||
"@stylable/core": "^3.1.1", | ||
"@stylable/core": "^3.1.3", | ||
"chai": "^4.2.0", | ||
@@ -34,3 +34,3 @@ "flat": "^5.0.0", | ||
"license": "BSD-3-Clause", | ||
"gitHead": "f793219f09b3fea83005ecd1848d1c9dfeb15df2" | ||
"gitHead": "ebe8f0a6a6472621e671b3333ed410660325b73a" | ||
} |
@@ -33,5 +33,5 @@ import postcss from 'postcss'; | ||
msg?: string, | ||
offset: number = 0 | ||
offset = 0 | ||
) { | ||
all.forEach((_, i) => matchRuleAndDeclaration(parent, i + offset, _[0], _[1], msg)); | ||
} |
import { expect } from 'chai'; | ||
import flatten from 'flat'; | ||
export function flatMatch(chai: any, util: any) { | ||
export function flatMatch(chai: Chai.ChaiStatic, util: Chai.ChaiUtils) { | ||
const { flag } = util; | ||
chai.Assertion.addMethod('flatMatch', function(this: any, obj: {}, maxDepth: number = 5) { | ||
chai.Assertion.addMethod('flatMatch', function(obj: {}, maxDepth = 5) { | ||
expect(flatten(flag(this, 'object'), { maxDepth })).to.contain(flatten(obj)); | ||
}); | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
50421
790
Updated@stylable/core@^3.1.3