test: cover publishing, authentication and storage persistence
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user