@networkpro/web
Version:
Locking Down Networks, Unlocking Confidence™ | Security, Networking, Privacy — Network Pro Strategies
41 lines (34 loc) • 1.19 kB
JavaScript
/* ==========================================================================
tests/meta/meta.test.js
Copyright © 2025-2026 Network Pro Strategies (Network Pro™)
SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
This file is part of Network Pro.
========================================================================== */
/**
* @file meta.test.js
* @description Checks for correct metadata population in CI
* @module tests/meta
* @author Scott Lopez
* @updated 2025-09-17
*/
import { describe, expect, it } from 'vitest';
import { load } from '../../src/routes/+layout.js';
const routes = [
{
path: '/',
title: /Security, Networking, Privacy/,
description: /Locking Down Networks/,
},
// add more paths as needed:
// { path: '/about', title: /About/, description: /Network Pro/ }
];
describe('Meta checks', () => {
for (const route of routes) {
it(`should return correct meta for ${route.path}`, () => {
const mockUrl = new URL(`http://localhost${route.path}`);
const { meta } = load({ url: mockUrl });
expect(meta.title).toMatch(route.title);
expect(meta.description).toMatch(route.description);
});
}
});