mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Fix tests
This commit is contained in:
parent
8ba623f5fe
commit
5ccc810999
3 changed files with 6 additions and 9 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue