fix: update chai types for breaking changes negated property asserts in 4.0 (#42134)

See: https://github.com/chaijs/chai/issues/781
This commit is contained in:
Matthew Gabeler-Lee
2020-02-11 08:40:52 -08:00
committed by GitHub
parent ad0dbaf98a
commit bd5f77704d
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1694,15 +1694,15 @@ suite('assert', () => {
assert.deepProperty(obj, 'foo.bar');
assert.notDeepProperty(obj, 'foo.baz');
assert.deepPropertyVal(obj, 'foo.bar', 'baz');
assert.deepPropertyNotVal(simpleObj, 'foo.bar', 'flow');
assert.notDeepPropertyVal(simpleObj, 'foo.bar', 'flow');
assert.property(simpleObj, 'baz');
assert.deepProperty(obj, 'foo.baz');
assert.notProperty(obj, 'foo');
assert.notDeepProperty(obj, 'foo.bar');
assert.propertyVal(simpleObj, 'foo', 'ball');
assert.deepPropertyVal(obj, 'foo.bar', 'ball');
assert.propertyNotVal(simpleObj, 'foo', 'bar');
assert.deepPropertyNotVal(simpleObj, 'foo.bar', 'baz');
assert.notPropertyVal(simpleObj, 'foo', 'bar');
assert.notDeepPropertyVal(simpleObj, 'foo.bar', 'baz');
});
test('throws', () => {
+2 -2
View File
@@ -1126,7 +1126,7 @@ declare namespace Chai {
* @param value Potential expected property value.
* @param message Message to display on error.
*/
propertyNotVal<T, V>(object: T, property: string /* keyof T */, value: V, message?: string): void;
notPropertyVal<T, V>(object: T, property: string /* keyof T */, value: V, message?: string): void;
/**
* Asserts that object has a property named by property, which can be a string
@@ -1152,7 +1152,7 @@ declare namespace Chai {
* @param value Potential expected property value.
* @param message Message to display on error.
*/
deepPropertyNotVal<T, V>(object: T, property: string, value: V, message?: string): void;
notDeepPropertyVal<T, V>(object: T, property: string, value: V, message?: string): void;
/**
* Asserts that object has a length property with the expected value.