Files
esbuild/internal/test/util.go
2020-09-12 14:50:17 -07:00

25 lines
438 B
Go

package test
import (
"testing"
"github.com/evanw/esbuild/internal/logger"
)
func AssertEqual(t *testing.T, a interface{}, b interface{}) {
t.Helper()
if a != b {
t.Fatalf("%s != %s", a, b)
}
}
func SourceForTest(contents string) logger.Source {
return logger.Source{
Index: 0,
KeyPath: logger.Path{Text: "<stdin>"},
PrettyPath: "<stdin>",
Contents: contents,
IdentifierName: "stdin",
}
}