Adding more details on how to run the playground code to address the issue #705.

This commit is contained in:
Oleksii Trekhleb 2021-05-14 09:56:18 +02:00
parent cb50e4e9f3
commit 8a24fbfac9
2 changed files with 17 additions and 3 deletions

View File

@ -1,5 +1,8 @@
import playground from '../playground';
describe('playground', () => { describe('playground', () => {
it('should perform playground tasks', () => { it('should return correct results', () => {
// Place your playground tests here. // Replace the next dummy test with your playground function tests.
expect(playground()).toBe(120);
}); });
}); });

View File

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