updated jsvm types
This commit is contained in:
parent
1fcc2d8683
commit
982f876a93
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -7,6 +7,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestCronNew(t *testing.T) {
|
func TestCronNew(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
expectedInterval := 1 * time.Minute
|
expectedInterval := 1 * time.Minute
|
||||||
|
@ -29,6 +31,8 @@ func TestCronNew(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronSetInterval(t *testing.T) {
|
func TestCronSetInterval(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
interval := 2 * time.Minute
|
interval := 2 * time.Minute
|
||||||
|
@ -41,6 +45,8 @@ func TestCronSetInterval(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronSetTimezone(t *testing.T) {
|
func TestCronSetTimezone(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
timezone, _ := time.LoadLocation("Asia/Tokyo")
|
timezone, _ := time.LoadLocation("Asia/Tokyo")
|
||||||
|
@ -53,6 +59,8 @@ func TestCronSetTimezone(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronAddAndRemove(t *testing.T) {
|
func TestCronAddAndRemove(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
if err := c.Add("test0", "* * * * *", nil); err == nil {
|
if err := c.Add("test0", "* * * * *", nil); err == nil {
|
||||||
|
@ -126,6 +134,8 @@ func TestCronAddAndRemove(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronMustAdd(t *testing.T) {
|
func TestCronMustAdd(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
@ -144,6 +154,8 @@ func TestCronMustAdd(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronRemoveAll(t *testing.T) {
|
func TestCronRemoveAll(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
if err := c.Add("test1", "* * * * *", func() {}); err != nil {
|
if err := c.Add("test1", "* * * * *", func() {}); err != nil {
|
||||||
|
@ -170,6 +182,8 @@ func TestCronRemoveAll(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronTotal(t *testing.T) {
|
func TestCronTotal(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
if v := c.Total(); v != 0 {
|
if v := c.Total(); v != 0 {
|
||||||
|
@ -195,6 +209,8 @@ func TestCronTotal(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestCronStartStop(t *testing.T) {
|
func TestCronStartStop(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
c := New()
|
c := New()
|
||||||
|
|
||||||
c.SetInterval(1 * time.Second)
|
c.SetInterval(1 * time.Second)
|
||||||
|
|
|
@ -9,6 +9,8 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestNewMoment(t *testing.T) {
|
func TestNewMoment(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
date, err := time.Parse("2006-01-02 15:04", "2023-05-09 15:20")
|
date, err := time.Parse("2006-01-02 15:04", "2023-05-09 15:20")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -38,6 +40,8 @@ func TestNewMoment(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestNewSchedule(t *testing.T) {
|
func TestNewSchedule(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
scenarios := []struct {
|
scenarios := []struct {
|
||||||
cronExpr string
|
cronExpr string
|
||||||
expectError bool
|
expectError bool
|
||||||
|
@ -272,6 +276,8 @@ func TestNewSchedule(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestScheduleIsDue(t *testing.T) {
|
func TestScheduleIsDue(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
scenarios := []struct {
|
scenarios := []struct {
|
||||||
cronExpr string
|
cronExpr string
|
||||||
moment *cron.Moment
|
moment *cron.Moment
|
||||||
|
|
Loading…
Reference in New Issue