Skip to content

Commit be7d58f

Browse files
Sync Rectangles tests with problem spec (#2551)
* Sync Rectangles tests with problem spec * [CI] Format code --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent d1bbdef commit be7d58f

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

exercises/practice/rectangles/.meta/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"ankorGH",
77
"SleeplessByte",
88
"tejasbubane",
9-
"xarxziux"
9+
"xarxziux",
10+
"themetar"
1011
],
1112
"files": {
1213
"solution": [

exercises/practice/rectangles/.meta/tests.toml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
# This is an auto-generated file. Regular comments will be removed when this
2-
# file is regenerated. Regenerating will not touch any manually added keys,
3-
# so comments can be added in a "comment" key.
1+
# This is an auto-generated file.
2+
#
3+
# Regenerating this file via `configlet sync` will:
4+
# - Recreate every `description` key/value pair
5+
# - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6+
# - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7+
# - Preserve any other key/value pair
8+
#
9+
# As user-added comments (using the # character) will be removed when this file
10+
# is regenerated, comments can be added via a `comment` key.
411

512
[485b7bab-4150-40aa-a8db-73013427d08c]
613
description = "no rows"
@@ -40,3 +47,6 @@ description = "corner is required for a rectangle to be complete"
4047

4148
[d78fe379-8c1b-4d3c-bdf7-29bfb6f6dc66]
4249
description = "large input with many rectangles"
50+
51+
[6ef24e0f-d191-46da-b929-4faca24b4cd2]
52+
description = "rectangles must have four sides"

exercises/practice/rectangles/rectangles.spec.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,19 @@ describe('Rectangles', () => {
112112

113113
expect(actual).toEqual(expected);
114114
});
115+
116+
xtest('rectangles must have four sides', () => {
117+
const expected = 5;
118+
const actual = count([
119+
'+-+ +-+',
120+
'| | | |',
121+
'+-+-+-+',
122+
' | | ',
123+
'+-+-+-+',
124+
'| | | |',
125+
'+-+ +-+',
126+
]);
127+
128+
expect(actual).toEqual(expected);
129+
});
115130
});

0 commit comments

Comments
 (0)