Initial commit with tests and deployment pipeline
Test and Deploy Website / test-and-deploy (push) Successful in 1m12s

This commit is contained in:
2026-06-15 14:00:18 +02:00
commit f0b4f42cb1
11 changed files with 613 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
const test = require('node:test');
const assert = require('node:assert');
const { validateEmail, formatGreeting } = require('../public/js/utils.js');
test('Unit Tests: validateEmail', (t) => {
assert.strictEqual(validateEmail('mail@robert-mueller.net'), true);
assert.strictEqual(validateEmail('invalid-email'), false);
assert.strictEqual(validateEmail('@domain.com'), false);
});
test('Unit Tests: formatGreeting', (t) => {
assert.strictEqual(
formatGreeting('evening', 'Robert Müller'),
"Good evening, welcome to Robert Müller's portfolio!"
);
});