GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — opencode/packages/opencode/test/plugin/shared.test.ts at dev · sashankh/opencode Expand file tree/ Copy pathshared.test.tsMore file actions 88 lines (76 loc) · 2.69 KB / Copy pathshared.test.tsFile metadata and controls88 lines (76 loc) · 2.69 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 import { describe, expect, test } from "bun:test" import { parsePluginSpecifier } from "../../src/plugin/shared" describe("parsePluginSpecifier", () => { test("parses standard npm package without version", () => { expect(parsePluginSpecifier("acme")).toEqual({ pkg: "acme", version: "latest", }) }) test("parses standard npm package with version", () => { pkg: "acme", version: "1.0.0", }) }) test("parses scoped npm package without version", () => { expect(parsePluginSpecifier("@opencode/acme")).toEqual({ pkg: "@opencode/acme", version: "latest", }) }) test("parses scoped npm package with version", () => { pkg: "@opencode/acme", version: "1.0.0", }) }) test("parses package with git+https url", () => { expect(parsePluginSpecifier("acme@git+https://github.com/opencode/acme.git")).toEqual({ pkg: "acme", version: "git+https://github.com/opencode/acme.git", }) }) test("parses scoped package with git+https url", () => { expect(parsePluginSpecifier("@opencode/acme@git+https://github.com/opencode/acme.git")).toEqual({ pkg: "@opencode/acme", version: "git+https://github.com/opencode/acme.git", }) }) test("parses package with git+ssh url containing another @", () => { pkg: "acme", }) }) test("parses scoped package with git+ssh url containing another @", () => { expect(parsePluginSpecifier("@opencode/acme@git+ssh://[email protected]/opencode/acme.git")).toEqual({ pkg: "@opencode/acme", }) }) test("parses unaliased git+ssh url", () => { version: "", }) }) test("parses npm alias using the alias name", () => { pkg: "acme", }) }) test("parses bare npm protocol specifier using the target package", () => { pkg: "@opencode/acme", version: "1.0.0", }) }) test("parses unversioned npm protocol specifier", () => { expect(parsePluginSpecifier("npm:@opencode/acme")).toEqual({ pkg: "@opencode/acme", version: "latest", }) }) }) |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |