exercism / exercism/problem-specifications

New tests for Rectangles

Open
#1,637 1 comment 1 reaction 0 assignees View on GitHub
hold
Dominant language
Ruby
Stars
358
Forks
563
Avg merge
18h 41m
Merged PRs (30d)
2

Description

Suggest new tests for Rectangles, if it fits within the intent of the exercise.
The tests are for rectangles that do not share sides with other existing rectangles.

```
test('separated rectangle, same size as other rectangle ', () => {
const expected = 4;
const actual = Rectangles.count([
' +-+',
' | |',
'+-+ +-+',
'| | | |',
'+-+ +-+',
]);

expect(actual).toEqual(expected);
});

test('separated rectangles, different sizes,no overlap ', () => {
const expected = 3;
const actual = Rectangles.count([
' +-+',
' | |',
' +-+',
'+-+ ',
'+-+ ',
' +---+ ',
' | | ',
' +---+ ',
]);

expect(actual).toEqual(expected);
});

test('separated rectangles, different sizes', () => {
const expected = 4;
const actual = Rectangles.count([
' +-+',
' | |',
' +-+',
'+-+ | |',
'| | | |',
'+-+ | |',
' +-+',
]);

expect(actual).toEqual(expected);
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.