MCPcopy Create free account
hub / github.com/devfeel/dotweb / Test_RunMode_2

Function Test_RunMode_2

dotweb_test.go:21–30  ·  view source on GitHub ↗

测试RunMode函数有配置文件时的返回值

(t *testing.T)

Source from the content-addressed store, hash-verified

19
20// 测试RunMode函数有配置文件时的返回值
21func Test_RunMode_2(t *testing.T) {
22 runModes := []string{"dev", "development", "prod", "production"}
23
24 app := New()
25 for _, value := range runModes {
26 app.Config.App.RunMode = value
27 runMode := app.RunMode()
28 t.Log("runModes value:", value, "RunMode:", runMode)
29 }
30}
31
32// 测试IsDevelopmentMode函数
33func Test_IsDevelopmentMode_1(t *testing.T) {

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
RunModeMethod · 0.80

Tested by

no test coverage detected