feat: US-003 - Test pentru hello
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
4410
test-ralph-workflow/package-lock.json
generated
Normal file
4410
test-ralph-workflow/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,9 @@
|
|||||||
"description": "Proiect minimal pentru testare workflow Ralph",
|
"description": "Proiect minimal pentru testare workflow Ralph",
|
||||||
"main": "src/hello.js",
|
"main": "src/hello.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"No tests yet\" && exit 0"
|
"test": "jest"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"jest": "^30.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
"Test verifică hello(\"World\") === \"Hello, world!\"",
|
"Test verifică hello(\"World\") === \"Hello, world!\"",
|
||||||
"npm test passes"
|
"npm test passes"
|
||||||
],
|
],
|
||||||
"passes": false,
|
"passes": true,
|
||||||
"notes": ""
|
"notes": "Jest instalat ca devDependency, test script configurat în package.json. tests/hello.test.js verifică hello(\"World\") === \"Hello, world!\". npm test passes."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,3 +26,16 @@ Project: hello-ralph-test
|
|||||||
### Next steps:
|
### Next steps:
|
||||||
- US-003: Adăugare test jest pentru funcția hello
|
- US-003: Adăugare test jest pentru funcția hello
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Iterație: 2026-02-08T14:20:00Z
|
||||||
|
### Story implementat: US-003 - Test pentru hello
|
||||||
|
### Status: Complete
|
||||||
|
|
||||||
|
### Learnings:
|
||||||
|
- Jest 30.x instalat ca devDependency, script "test" actualizat de la placeholder la "jest".
|
||||||
|
- Test minimal: un singur `test()` care verifică hello("World") === "Hello, world!".
|
||||||
|
- npm test trece cu succes.
|
||||||
|
|
||||||
|
### Next steps:
|
||||||
|
- Toate stories sunt complete. PRD finalizat.
|
||||||
|
---
|
||||||
|
|||||||
5
test-ralph-workflow/tests/hello.test.js
Normal file
5
test-ralph-workflow/tests/hello.test.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
const { hello } = require('../src/hello');
|
||||||
|
|
||||||
|
test('hello("World") returns "Hello, world!"', () => {
|
||||||
|
expect(hello('World')).toBe('Hello, world!');
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user