Rename CompileDir to CacheDir

This commit is contained in:
Ryan Dahl 2018-05-24 10:25:38 -04:00
parent b98f9f1efe
commit 19ba0321b0
3 changed files with 16 additions and 13 deletions

View file

@ -5,16 +5,16 @@ import (
"testing"
)
func SetCompileDirForTest(prefix string) {
func SetCacheDirForTest(prefix string) {
dir, err := ioutil.TempDir("", prefix)
if err != nil {
panic(err)
}
CompileDir = dir
CacheDir = dir
}
func TestLoadOutputCodeCache(t *testing.T) {
SetCompileDirForTest("TestLoadOutputCodeCache")
SetCacheDirForTest("TestLoadOutputCodeCache")
filename := "Hello.ts"
sourceCodeBuf := []byte("1+2")