Skip to content

Commit 1bde200

Browse files
initial commit with basic project structure
Co-authored-by: Cursor <cursoragent@cursor.com>
0 parents  commit 1bde200

4 files changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# test-scratch-repo
2+
3+
Scratch repo for testing Pullfrog triggers.

index.js

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

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "test-scratch-repo",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"test": "node test.js",
6+
"lint": "echo lint passed"
7+
}
8+
}

test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const { add, subtract } = require("./index");
2+
3+
const assert = require("assert");
4+
5+
assert.strictEqual(add(1, 2), 3);
6+
assert.strictEqual(subtract(5, 3), 2);
7+
8+
console.log("All tests passed!");

0 commit comments

Comments
 (0)