test: cover publishing, authentication and storage persistence

This commit is contained in:
2026-09-15 21:48:15 +03:30
parent ee9f49e4b7
commit c17b4b57b2
11 changed files with 294 additions and 23 deletions

View File

@@ -1,7 +1,13 @@
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import { readFile, access } from 'node:fs/promises';
import test from 'node:test';
test('the production package does not contain runtime data or authentication secrets', async () => {
await assert.rejects(access('.next/standalone/data/auth-secret'));
await assert.rejects(access('.next/standalone/data/portfolio.sqlite'));
await assert.rejects(access('.next/standalone/.env'));
});
test('Next runs as a standalone server with the image optimizer enabled', async () => {
const [config, packageJson] = await Promise.all([
readFile('next.config.mjs', 'utf8'),