Skip to content

Commit 6111504

Browse files
authored
fix(curriculum): remove before/after-user-code from first 5 rosetta challenges (freeCodeCamp#66344)
1 parent 52e2141 commit 6111504

5 files changed

Lines changed: 44 additions & 49 deletions

File tree

curriculum/challenges/english/blocks/rosetta-code-challenges/594810f028c0303b75339acb.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,12 @@ assert(Array.isArray(getFinalOpenedDoors(100)));
3131
`getFinalOpenedDoors` should produce the correct result.
3232

3333
```js
34+
const solution = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];
3435
assert.deepEqual(getFinalOpenedDoors(100), solution);
3536
```
3637

3738
# --seed--
3839

39-
## --after-user-code--
40-
41-
```js
42-
const solution = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];
43-
```
44-
4540
## --seed-contents--
4641

4742
```js

curriculum/challenges/english/blocks/rosetta-code-challenges/594810f028c0303b75339acc.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ Some rules to keep in mind:
4343
<li>The function should be case-insensitive.</li>
4444
</ul>
4545

46+
# --before-each--
47+
48+
```js
49+
const words = ['bark', 'BooK', 'TReAT', 'COMMON', 'squAD', 'conFUSE'];
50+
```
51+
4652
# --hints--
4753

4854
`canMakeWord` should be a function.
@@ -95,12 +101,6 @@ assert(canMakeWord(words[5]));
95101

96102
# --seed--
97103

98-
## --after-user-code--
99-
100-
```js
101-
const words = ['bark', 'BooK', 'TReAT', 'COMMON', 'squAD', 'conFUSE'];
102-
```
103-
104104
## --seed-contents--
105105

106106
```js

curriculum/challenges/english/blocks/rosetta-code-challenges/594810f028c0303b75339ace.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,21 @@ assert(typeof accumulator(0)(2) === 'number');
4545
Passing in the values 3, -4, 1.5, and 5 should return 5.5.
4646

4747
```js
48-
assert(testFn(5) === 5.5);
48+
assert(testFn && testFn(5) === 5.5);
4949
```
5050

51-
# --seed--
52-
53-
## --after-user-code--
51+
# --before-each--
5452

5553
```js
56-
const testFn = typeof accumulator(3) === 'function' && accumulator(3);
54+
const testFn = typeof accumulator === 'function' && accumulator(3);
5755
if (testFn) {
5856
testFn(-4);
5957
testFn(1.5);
6058
}
6159
```
6260

61+
# --seed--
62+
6363
## --seed-contents--
6464

6565
```js

curriculum/challenges/english/blocks/rosetta-code-challenges/594810f028c0303b75339ad0.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -46,35 +46,7 @@ For example, one of the lines from the `testText`, after justifying to the right
4646
' column are separated by at least one space.\n'
4747
```
4848

49-
# --hints--
50-
51-
`formatText` should be a function.
52-
53-
```js
54-
assert(typeof formatText === 'function');
55-
```
56-
57-
`formatText(testText, 'right')` should produce text with columns justified to the right.
58-
59-
```js
60-
assert.strictEqual(formatText(_testText, 'right'), rightAligned);
61-
```
62-
63-
`formatText(testText, 'left')` should produce text with columns justified to the left.
64-
65-
```js
66-
assert.strictEqual(formatText(_testText, 'left'), leftAligned);
67-
```
68-
69-
`formatText(testText, 'center')` should produce text with columns justified to the center.
70-
71-
```js
72-
assert.strictEqual(formatText(_testText, 'center'), centerAligned);
73-
```
74-
75-
# --seed--
76-
77-
## --after-user-code--
49+
# --before-each--
7850

7951
```js
8052
const _testText = [
@@ -124,6 +96,34 @@ const centerAligned = ' Given a text file of many
12496
' or center justified within its column. ';
12597
```
12698

99+
# --hints--
100+
101+
`formatText` should be a function.
102+
103+
```js
104+
assert(typeof formatText === 'function');
105+
```
106+
107+
`formatText(testText, 'right')` should produce text with columns justified to the right.
108+
109+
```js
110+
assert.strictEqual(formatText(_testText, 'right'), rightAligned);
111+
```
112+
113+
`formatText(testText, 'left')` should produce text with columns justified to the left.
114+
115+
```js
116+
assert.strictEqual(formatText(_testText, 'left'), leftAligned);
117+
```
118+
119+
`formatText(testText, 'center')` should produce text with columns justified to the center.
120+
121+
```js
122+
assert.strictEqual(formatText(_testText, 'center'), centerAligned);
123+
```
124+
125+
# --seed--
126+
127127
## --seed-contents--
128128

129129
```js

curriculum/challenges/english/blocks/rosetta-code-challenges/594810f028c0303b75339ad2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ assert.equal(crossProduct(), null);
3434
assert.deepEqual(res12, exp12);
3535
```
3636

37-
# --seed--
38-
39-
## --after-user-code--
37+
# --before-each--
4038

4139
```js
4240
const tv1 = [1, 2, 3];
@@ -45,6 +43,8 @@ const res12 = crossProduct(tv1, tv2);
4543
const exp12 = [-3, 6, -3];
4644
```
4745

46+
# --seed--
47+
4848
## --seed-contents--
4949

5050
```js

0 commit comments

Comments
 (0)