mirror of
				https://github.com/taigrr/wasm-experiments
				synced 2025-01-18 04:03:21 -08:00 
			
		
		
		
	Fix make test
This commit is contained in:
		
							parent
							
								
									f488b6c469
								
							
						
					
					
						commit
						eb9e2b3c3b
					
				
							
								
								
									
										5
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								Makefile
									
									
									
									
									
								
							| @ -74,8 +74,9 @@ vecty: clean | |||||||
| 	cp ./vecty/index.html ./html/index.html | 	cp ./vecty/index.html ./html/index.html | ||||||
| 	cp $$(go env GOROOT)/misc/wasm/wasm_exec.js ./html/wasm_exec.js | 	cp $$(go env GOROOT)/misc/wasm/wasm_exec.js ./html/wasm_exec.js | ||||||
| 
 | 
 | ||||||
| test: clean | .PHONY: test | ||||||
| 	GOOS=js GOARCH=wasm go test -c -o ./html/test.wasm ./test/ | test: | ||||||
|  | 	GOOS=js GOARCH=wasm go test -v ./test/ | ||||||
| 
 | 
 | ||||||
| clean: | clean: | ||||||
| 	rm -f ./html/* | 	rm -f ./html/* | ||||||
|  | |||||||
| @ -20,7 +20,8 @@ type jsonResp struct { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| func TestFetch(t *testing.T) { | func TestFetch(t *testing.T) { | ||||||
| 	resp, err := http.Get("https://httpbin.org/get") | 	u := "https://httpbin.org/get" | ||||||
|  | 	resp, err := http.Get(u) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Fatal(err) | 		t.Fatal(err) | ||||||
| 	} | 	} | ||||||
| @ -36,7 +37,7 @@ func TestFetch(t *testing.T) { | |||||||
| 		t.Fatal(err) | 		t.Fatal(err) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if r.URL != "https://httpbin.org/get" { | 	if r.URL != u { | ||||||
| 		t.Errorf("Unexpected request URL: %q", r.URL) | 		t.Errorf("Unexpected request URL: %q", r.URL) | ||||||
| 	} | 	} | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user