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",
|
||||
"main": "src/hello.js",
|
||||
"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!\"",
|
||||
"npm test passes"
|
||||
],
|
||||
"passes": false,
|
||||
"notes": ""
|
||||
"passes": true,
|
||||
"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:
|
||||
- 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