


























@@ -16,7 +16,7 @@ struct RuntimeLocatorTests {
1616@Test func `resolve succeeds with valid node`() throws {
1717let script = """
1818 #!/bin/sh
19- echo v22.16.0
19+ echo v22.19.0
2020 """
2121let node = try self.makeTempExecutable(contents: script)
2222let result = RuntimeLocator.resolve(searchPaths: [node.deletingLastPathComponent().path])
@@ -25,22 +25,22 @@ struct RuntimeLocatorTests {
2525return
2626}
2727 #expect(res.path == node.path)
28- #expect(res.version == RuntimeVersion(major: 22, minor: 16, patch: 0))
28+ #expect(res.version == RuntimeVersion(major: 22, minor: 19, patch: 0))
2929}
30303131@Test func `resolve fails on boundary below minimum`() throws {
3232let script = """
3333 #!/bin/sh
34- echo v22.15.9
34+ echo v22.18.9
3535 """
3636let node = try self.makeTempExecutable(contents: script)
3737let result = RuntimeLocator.resolve(searchPaths: [node.deletingLastPathComponent().path])
3838guard case let .failure(.unsupported(_, found, required, path, _)) = result else {
3939Issue.record("Expected unsupported error, got \(result)")
4040return
4141}
42- #expect(found == RuntimeVersion(major: 22, minor: 15, patch: 9))
43- #expect(required == RuntimeVersion(major: 22, minor: 16, patch: 0))
42+ #expect(found == RuntimeVersion(major: 22, minor: 18, patch: 9))
43+ #expect(required == RuntimeVersion(major: 22, minor: 19, patch: 0))
4444 #expect(path == node.path)
4545}
4646@@ -76,7 +76,7 @@ struct RuntimeLocatorTests {
76767777@Test func `describe failure includes paths`() {
7878let msg = RuntimeLocator.describeFailure(.notFound(searchPaths: ["/tmp/a", "/tmp/b"]))
79- #expect(msg.contains("Node >=22.16.0"))
79+ #expect(msg.contains("Node >=22.19.0"))
8080 #expect(msg.contains("PATH searched: /tmp/a:/tmp/b"))
81818282let parseMsg = RuntimeLocator.describeFailure(
@@ -85,7 +85,7 @@ struct RuntimeLocatorTests {
8585 raw: "garbage",
8686 path: "/usr/local/bin/node",
8787 searchPaths: ["/usr/local/bin"]))
88- #expect(parseMsg.contains("Node >=22.16.0"))
88+ #expect(parseMsg.contains("Node >=22.19.0"))
8989}
90909191@Test func `runtime version parses with leading V and metadata`() {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。