Closed evgenyigumnov closed 1 month ago
Launch example
rustsn --lang=javascript
Example query:
take 2 params and add them and return result
Example generation:
package.json
{ "name": "solution", "version": "1.0.0", "description": "Minimalistic project", "main": "src/solution.js", "scripts": { "test": "jest", "build": "webpack --mode development" }, "devDependencies": { "jest": "^29.0.0" }, "keywords": [], "author": "", "license": "ISC" }
src/solution.js
function solution(a, b) { return a + b; } module.exports = solution;
src/solution.test.js
const solution= require('./solution'); test('test1', () => { expect(solution(1, 2)).toBe(3); }); test('test2', () => { expect(solution(-1, -2)).toBe(-3); }); test('test3', () => { expect(solution('1', 2)).toBe('12'); });
Example install dependecies
npm install
Example launch compilation
npm run build
Example launch test
npm test
Launch example
Example query:
Example generation:
package.json
src/solution.js
src/solution.test.js
Example install dependecies
Example launch compilation
Example launch test