Skip to content

Commit 6e15c28

Browse files
author
Labby AI
committed
Add Node.js project files
1 parent 4332cf0 commit 6e15c28

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
function sum(a, b) {
2+
return a + b;
3+
}
4+
module.exports = sum;

index.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const sum = require('./index');
2+
3+
test('adds 1 + 2 to equal 3', () => {
4+
expect(sum(1, 2)).toBe(3);
5+
});

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "ci-demo",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"test": "jest"
6+
},
7+
"dependencies": {
8+
"jest": "^29.7.0"
9+
}
10+
}

0 commit comments

Comments
 (0)