Skip to content

Commit 8a24fbf

Browse files
committedMay 14, 2021
Adding more details on how to run the playground code to address the issue trekhleb#705.
1 parent cb50e4e commit 8a24fbf

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed
 
+5-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import playground from '../playground';
2+
13
describe('playground', () => {
2-
it('should perform playground tasks', () => {
3-
// Place your playground tests here.
4+
it('should return correct results', () => {
5+
// Replace the next dummy test with your playground function tests.
6+
expect(playground()).toBe(120);
47
});
58
});

‎src/playground/playground.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
// Place your playground code here.
1+
// Import any algorithmic dependencies you need for your playground code here.
2+
import factorial from '../algorithms/math/factorial/factorial';
3+
4+
// Write your playground code inside the playground() function.
5+
// Test your code from __tests__/playground.test.js
6+
// Launch playground tests by running: npm test -- 'playground'
7+
function playground() {
8+
// Replace the next line with your playground code.
9+
return factorial(5);
10+
}
11+
12+
export default playground;

0 commit comments

Comments
 (0)