img/img_test.go

28 lines
430 B
Go
Raw Permalink Normal View History

2025-07-29 16:59:49 +08:00
package img_test
import (
"os"
"testing"
"apigo.cc/gojs"
_ "apigo.cc/gojs/console"
_ "apigo.cc/gojs/img"
)
func TestCreateImage(t *testing.T) {
defer func() {
// os.Remove("testimg")
}()
gojs.ExportForDev()
os.Mkdir("testimg", 0755)
_, err := gojs.RunFile("img_test.js")
if err != nil {
t.Fatal(err)
}
// runtime.GC()
// time.Sleep(time.Second)
// if r != true {
// t.Fatal("run file failed, ", r)
// }
}