Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ses): Update inert constructor error messages and add tests #822

Merged
merged 2 commits into from
Jul 8, 2021

Conversation

rekmarks
Copy link
Contributor

@rekmarks rekmarks commented Jul 8, 2021

Updates the error messages of errors thrown by inert function constructors and add tests to ensure that they do in fact throw those errors after lockdown.

Copy link
Contributor

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rekmarks rekmarks merged commit fa82272 into endojs:master Jul 8, 2021
@rekmarks rekmarks deleted the inert-constructor-tests branch July 8, 2021 23:25
@@ -75,7 +75,9 @@ export default function tameFunctionConstructors() {
// prototype of functions.
// eslint-disable-next-line func-names
const InertConstructor = function() {
throw new TypeError('Not available');
throw new TypeError(
'Function.prototype.constructor is not a valid constructor.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'Function.prototype.constructor is not a valid constructor.',
`${name}.prototype.constructor is not a valid constructor.`,

kriskowal pushed a commit that referenced this pull request Jan 20, 2022
* fix: tolerate endo pre and post #822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants