deno.land / x / esm@v135_2 / server / git_test.go

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
package server
import ( "os" "path" "testing")
func TestGhInstall(t *testing.T) { dir := os.TempDir() err := ghInstall(dir, "esm-dev/esm.sh", "main") if err != nil { t.Fatal(err) } if !fileExists(path.Join(dir, "node_modules/esm-dev/esm.sh/README.md")) { t.Fatal("README.md not found") }}
func TestListRepoRefs(t *testing.T) { refs, err := listRepoRefs("https://github.com/esm-dev/esm.sh") if err != nil { t.Fatal(err) } var headSha string for _, ref := range refs { if ref.Ref == "HEAD" { headSha = ref.Sha break } } if headSha == "" { t.Fatal("HEAD not found") }}
esm

Version Info

Tagged at
2 months ago