Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
lib-ical
Commits
e3218ab8
Unverified
Commit
e3218ab8
authored
Sep 11, 2016
by
Mark Stenglein
Browse files
Add tests for err on invalid exclusions
parent
0fd62369
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_0.2.x.js
View file @
e3218ab8
...
...
@@ -987,6 +987,40 @@ describe('ical-generator 0.2.x / ICalCalendar', function() {
});
},
/`repeating
\.
byMonthDay` contains invalid value `32`/
);
});
it
(
'
should throw error when repeating.exclude is not valid
'
,
function
()
{
var
cal
=
ical
();
assert
.
throws
(
function
()
{
cal
.
createEvent
({
start
:
new
Date
(),
end
:
new
Date
(),
summary
:
'
test
'
,
repeating
:
{
freq
:
'
DAILY
'
,
interval
:
2
,
byDay
:
[
'
SU
'
],
exclude
:
'
FOO
'
}
});
},
/`repeating
\.
exclude` contains invalid value `FOO`/
);
});
it
(
'
should throw error when repeating.exclude is not valid (should throw on first err value
'
,
function
()
{
var
cal
=
ical
();
assert
.
throws
(
function
()
{
cal
.
createEvent
({
start
:
new
Date
(),
end
:
new
Date
(),
summary
:
'
test
'
,
repeating
:
{
freq
:
'
DAILY
'
,
interval
:
2
,
byDay
:
[
'
SU
'
],
exclude
:
[
new
Date
(),
'
BAR
'
,
'
FOO
'
]
}
});
},
/`repeating
\.
exclude` contains invalid value `BAR`/
);
});
});
describe
(
'
summary()
'
,
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment