Skip to content

Commit

Permalink
New unit tests for short time cases
Browse files Browse the repository at this point in the history
  • Loading branch information
alordash committed Sep 21, 2020
1 parent c51d0ff commit 3c9fb4f
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spec/EN.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,33 @@ const stringTests = [
}
}
]
},
{
in: 'cake in 20S 2H 5m 5D 20Y and at 7M something',
outs: [
{
max_date: {},
period_time: {},
string: 'cake',
target_date: {
dates: now.getUTCDate() + 5,
hours: now.getUTCHours() + 2,
isOffset: true,
minutes: now.getUTCMinutes() + 5,
months: now.getUTCMonth(),
seconds: now.getUTCSeconds() + 20,
years: now.getUTCFullYear() + 20
}
},
{
max_date: {},
period_time: {},
string: 'something',
target_date: {
months: 6
}
}
]
}
];

Expand Down
27 changes: 27 additions & 0 deletions spec/RU.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,33 @@ const stringTests = [
}
}
]
},
{
in: 'кратко через 20С 2ч 5м 5д 20г и в 6М что-то',
outs: [
{
max_date: {},
period_time: {},
string: 'кратко',
target_date: {
dates: now.getUTCDate() + 5,
hours: now.getUTCHours() + 2,
isOffset: true,
minutes: now.getUTCMinutes() + 5,
months: now.getUTCMonth(),
seconds: now.getUTCSeconds() + 20,
years: now.getUTCFullYear() + 20
}
},
{
max_date: {},
period_time: {},
string: 'что-то',
target_date: {
months: 5
}
}
]
}
];

Expand Down

0 comments on commit 3c9fb4f

Please sign in to comment.