diff --git a/src/playground/__test__/playground.test.js b/src/playground/__test__/playground.test.js index 501a87a7..84a3e830 100644 --- a/src/playground/__test__/playground.test.js +++ b/src/playground/__test__/playground.test.js @@ -1,5 +1,8 @@ +import playground from '../playground'; + describe('playground', () => { - it('should perform playground tasks', () => { - // Place your playground tests here. + it('should return correct results', () => { + // Replace the next dummy test with your playground function tests. + expect(playground()).toBe(120); }); }); diff --git a/src/playground/playground.js b/src/playground/playground.js index 7872c9e3..b8c5b210 100644 --- a/src/playground/playground.js +++ b/src/playground/playground.js @@ -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;