Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions exercises/practice/series/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
],
"contributors": [
"ankorGH",
"jagdish-15",
"rchavarria",
"ryanplusplus",
"serixscorpio",
Expand Down
16 changes: 13 additions & 3 deletions exercises/practice/series/.meta/tests.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# This is an auto-generated file. Regular comments will be removed when this
# file is regenerated. Regenerating will not touch any manually added keys,
# so comments can be added in a "comment" key.
# This is an auto-generated file.
#
# Regenerating this file via `configlet sync` will:
# - Recreate every `description` key/value pair
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
# - Preserve any other key/value pair
#
# As user-added comments (using the # character) will be removed when this file
# is regenerated, comments can be added via a `comment` key.

[7ae7a46a-d992-4c2a-9c15-a112d125ebad]
description = "slices of one from one"
Expand All @@ -23,6 +30,9 @@ description = "slices of a long series"
[6d235d85-46cf-4fae-9955-14b6efef27cd]
description = "slice length is too large"

[d7957455-346d-4e47-8e4b-87ed1564c6d7]
description = "slice length is way too large"

[d34004ad-8765-4c09-8ba1-ada8ce776806]
description = "slice length cannot be zero"

Expand Down
6 changes: 6 additions & 0 deletions exercises/practice/series/series.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ describe('Series', () => {
}).toThrow(new Error('slice length cannot be greater than series length'));
});

xtest('slice length is way too large', () => {
expect(() => {
new Series('12345').slices(42);
}).toThrow(new Error('slice length cannot be greater than series length'));
});

xtest('slice length cannot be zero', () => {
expect(() => {
new Series('12345').slices(0);
Expand Down