Skip to content

Commit 8a24fbf

Browse files
committed
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
Lines changed: 5 additions & 2 deletions
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

Lines changed: 12 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy