ses/enablements: add some missing enablements
MODIFY
packages/ses/src/enablements.js
packages/ses/src/enablements.js
@@ -77,6 +77,12 @@ export default {
constructor: t, // set by "fast-json-patch"
message: t,
name: t, // set by "precond"
+ toString: t, // set by "bluebird"
+ },
+
+ TypeErrorPrototype: {
+ constructor: t, // set by "readable-stream"
+ name: t, // set by "readable-stream"
},
PromisePrototype: {

MODIFY
packages/ses/test/enable-property-overrides.test.js
packages/ses/test/enable-property-overrides.test.js
@@ -66,6 +66,7 @@ test('enablePropertyOverrides - on', t => {
ArrayPrototype: Array.prototype,
FunctionPrototype: Function.prototype,
ErrorPrototype: Error.prototype,
+ TypeErrorPrototype: TypeError.prototype,
PromisePrototype: Promise.prototype,
JSON,
};
@@ -84,7 +85,13 @@ test('enablePropertyOverrides - on', t => {
'bind',
'toString',
]);
- testOverriding(t, 'Error', new Error(), ['constructor', 'name', 'message']);
+ testOverriding(t, 'Error', new Error(), [
+ 'constructor',
+ 'name',
+ 'message',
+ 'toString',
+ ]);
+ testOverriding(t, 'TypeError', new TypeError(), ['constructor', 'name']);
// eslint-disable-next-line func-names
testOverriding(t, 'Promise', new Promise(function() {}), ['constructor']);
testOverriding(t, 'JSON', JSON);

ses/enablements: add some missing enablements (#227)