Skip to content

Commit ca9adcb

Browse files
Fix enchantments.spec.js (#2712)
One describe per task!
1 parent beef674 commit ca9adcb

File tree

1 file changed

+19
-27
lines changed

1 file changed

+19
-27
lines changed

exercises/concept/elyses-enchantments/enchantments.spec.js

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -242,42 +242,34 @@ describe('make the bottom card disappear', () => {
242242
});
243243

244244
describe('check your work', () => {
245-
describe('an empty stack of cards', () => {
246-
test('has 0 cards', () => {
247-
const stack = [];
245+
test('an empty stack of cards has 0 cards', () => {
246+
const stack = [];
248247

249-
expect(checkSizeOfStack(stack, 0)).toBe(true);
250-
expect(checkSizeOfStack(stack, 1)).toBe(false);
251-
});
248+
expect(checkSizeOfStack(stack, 0)).toBe(true);
249+
expect(checkSizeOfStack(stack, 1)).toBe(false);
252250
});
253251

254-
describe('a stack with a single card', () => {
255-
test('has exactly 1 card', () => {
256-
const stack = [7];
252+
test('a stack with a single card has exactly 1 card', () => {
253+
const stack = [7];
257254

258-
expect(checkSizeOfStack(stack, 0)).toBe(false);
259-
expect(checkSizeOfStack(stack, 1)).toBe(true);
260-
expect(checkSizeOfStack(stack, 2)).toBe(false);
261-
});
255+
expect(checkSizeOfStack(stack, 0)).toBe(false);
256+
expect(checkSizeOfStack(stack, 1)).toBe(true);
257+
expect(checkSizeOfStack(stack, 2)).toBe(false);
262258
});
263259

264-
describe('a stack with the even cards', () => {
265-
test('has exactly 4 cards', () => {
266-
const stack = [2, 4, 6, 8];
260+
test('a stack with the even cards has exactly 4 cards', () => {
261+
const stack = [2, 4, 6, 8];
267262

268-
expect(checkSizeOfStack(stack, 3)).toBe(false);
269-
expect(checkSizeOfStack(stack, 4)).toBe(true);
270-
expect(checkSizeOfStack(stack, 5)).toBe(false);
271-
});
263+
expect(checkSizeOfStack(stack, 3)).toBe(false);
264+
expect(checkSizeOfStack(stack, 4)).toBe(true);
265+
expect(checkSizeOfStack(stack, 5)).toBe(false);
272266
});
273267

274-
describe('a stack with the odd cards', () => {
275-
test('has exactly 5 cards', () => {
276-
const stack = [1, 3, 5, 7, 9];
268+
test('a stack with the odd cards has exactly 5 cards', () => {
269+
const stack = [1, 3, 5, 7, 9];
277270

278-
expect(checkSizeOfStack(stack, 3)).toBe(false);
279-
expect(checkSizeOfStack(stack, 4)).toBe(false);
280-
expect(checkSizeOfStack(stack, 5)).toBe(true);
281-
});
271+
expect(checkSizeOfStack(stack, 3)).toBe(false);
272+
expect(checkSizeOfStack(stack, 4)).toBe(false);
273+
expect(checkSizeOfStack(stack, 5)).toBe(true);
282274
});
283275
});

0 commit comments

Comments
 (0)