UNPKG

@platform/react.ssr

Version:

A lightweight SSR (server-side-rendering) system for react apps bundled with ParcelJS and hosted on S3.

27 lines (20 loc) 794 B
export * from '@platform/test'; export * from '../common'; import { fs, t } from '../common'; import { Manifest } from '../manifest'; export const YAML_DIR = fs.resolve('src/test/yml'); export const YAML_MANIFEST = fs.join(YAML_DIR, 'manifest.yml'); const url = 'https://sfo2.digitaloceanspaces.com/platform/modules/react.ssr/manifest.yml'; export async function testManifest(filename = 'manifest.yml') { const path = fs.join(YAML_DIR, filename); return Manifest.fromFile({ path, baseUrl: url }); } export async function testManifestDef(filename = 'manifest.yml') { const path = fs.join(YAML_DIR, filename); const def = await fs.file.loadAndParse<t.IManifest>(path); return def; } /** * Clean away temp data after complete. */ after(async () => fs.remove(fs.resolve('tmp')));