Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/node_url_pattern.cc
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ void URLPattern::New(const FunctionCallbackInfo<Value>& args) {
options.has_value() ? &options.value() : nullptr);

if (!url_pattern) {
THROW_ERR_INVALID_URL_PATTERN(env, "Failed to constuct URLPattern");
THROW_ERR_INVALID_URL_PATTERN(env, "Failed to construct URLPattern");
return;
}

Expand Down
4 changes: 4 additions & 0 deletions test/parallel/test-urlpattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ throws(() => {
}, {
message: 'boom'
});

throws(() => {
new URLPattern('invalid value');
}, /TypeError: Failed to construct URLPattern/);
Loading