Files
zeekayandHanzo Dev 09a8db00c5 post: mount at hanzo.app/post, name it Post
Router basename and IAM return move under /post; the build writes /post/assets
URLs; the image serves /post. Client hanzo-social becomes hanzo-post. Site slug
and image become post.

Co-authored-by: Hanzo Dev <[email protected]>
2026-11-20 22:37:23 -08:00

17 lines
663 B
JavaScript

import assert from 'node:assert/strict'
import test from 'node:test'
import { mount } from './base.mjs'
test('every asset address moves under /post, once', () => {
const page = '<script src="/assets/main-AB12.js"></script><link href="/assets/main-AB12.css">'
const out = mount(page)
assert.equal(out, '<script src="/post/assets/main-AB12.js"></script><link href="/post/assets/main-AB12.css">')
assert.equal(mount(out), out)
})
test('a script that builds the address at run time is moved too', () => {
assert.equal(mount('n.p="/assets/"'), 'n.p="/post/assets/"')
assert.equal(mount('url(/assets/font-1.woff2)'), 'url(/post/assets/font-1.woff2)')
})