Initial commit with tests and deployment pipeline
Test and Deploy Website / test-and-deploy (push) Successful in 1m12s
Test and Deploy Website / test-and-deploy (push) Successful in 1m12s
This commit is contained in:
@@ -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!"
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user