diff --git a/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift b/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift index 1f2e5ff..ad1d980 100644 --- a/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift +++ b/Sources/WSCore/Extensions/WebSocketExtensionBuilder.swift @@ -134,7 +134,7 @@ public struct WebSocketExtensionFactory: Sendable { self.build = build } - public static func nonNegotiableExtension(_ _build: @escaping @Sendable () -> some WebSocketExtension) -> Self { + public static func nonNegotiatedExtension(_ _build: @escaping @Sendable () -> some WebSocketExtension) -> Self { return .init { WebSocketNonNegotiableExtensionBuilder { _build() diff --git a/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift b/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift index 2db8bff..01071c1 100644 --- a/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift +++ b/Tests/WebSocketTests/WebSocketExtensionNegotiationTests.swift @@ -99,7 +99,7 @@ final class WebSocketExtensionNegotiationTests: XCTestCase { func shutdown() async {} } - let clientExtensionBuilders: [WebSocketExtensionBuilder] = [WebSocketExtensionFactory.nonNegotiableExtension { + let clientExtensionBuilders: [WebSocketExtensionBuilder] = [WebSocketExtensionFactory.nonNegotiatedExtension { MyExtension() }.build()] let clientExtensions = try clientExtensionBuilders.buildClientExtensions(from: [:])