mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
7c10d563f2
This adds `import.meta.request` to pages (not components).
19 lines
482 B
JavaScript
19 lines
482 B
JavaScript
import { suite } from 'uvu';
|
|
import * as assert from 'uvu/assert';
|
|
import { doc } from './test-utils.js';
|
|
import { setup } from './helpers.js';
|
|
|
|
const Request = suite('import.meta.request');
|
|
|
|
setup(Request, './fixtures/astro-request');
|
|
|
|
Request('import.meta.request available', async (context) => {
|
|
const result = await context.runtime.load('/');
|
|
|
|
assert.equal(result.statusCode, 200);
|
|
|
|
const $ = doc(result.contents);
|
|
assert.equal($('h1').text(), '/');
|
|
});
|
|
|
|
Request.run();
|