Fix tests

This commit is contained in:
Lea Anthony 2025-01-20 19:56:03 +11:00
commit 5ccc810999
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405
3 changed files with 6 additions and 9 deletions

View file

@ -46,7 +46,7 @@ func TestGenerateIcon(t *testing.T) {
},
},
{
name: "should generate a .ico file when using the `input` flag and `windowsfilena me` flag",
name: "should generate a .ico file when using the `input` flag and `windowsfilename` flag",
setup: func() *IconsOptions {
// Get the directory of this file
_, thisFile, _, _ := runtime.Caller(1)
@ -68,10 +68,7 @@ func TestGenerateIcon(t *testing.T) {
}
defer func() {
// Remove the file
err = os.Remove("appicon.ico")
if err != nil {
return
}
_ = os.Remove("appicon.ico")
}()
if f.IsDir() {
return fmt.Errorf("appicon.ico is a directory")

View file

@ -8,13 +8,13 @@ import (
func TestSemanticVersion_IsGreaterThan(t *testing.T) {
is2 := is.New(t)
alpha1, err := NewSemanticVersion("v2.0.0-alpha.1")
alpha1, err := NewSemanticVersion("v3.0.0-alpha.1")
is2.NoErr(err)
beta1, err := NewSemanticVersion("v2.0.0-beta.1")
beta1, err := NewSemanticVersion("v3.0.0-beta.1")
is2.NoErr(err)
v2, err := NewSemanticVersion("v2.0.0")
v2, err := NewSemanticVersion("v3.0.0")
is2.NoErr(err)
is2.True(alpha1.IsPreRelease())

View file

@ -164,7 +164,7 @@ func parseTemplate(template fs.FS, templateName string) (Template, error) {
return result, fmt.Errorf("template not supported by wails 3. This template is probably for wails 2")
}
if result.Schema != 3 {
return result, fmt.Errorf("template version %d is not supported by wails 3. Ensure 'version' is set to 3 in the `template.json` file", result.Version)
return result, fmt.Errorf("template version %s is not supported by wails 3. Ensure 'version' is set to 3 in the `template.json` file", result.Version)
}
return result, nil