summaryrefslogtreecommitdiff
path: root/test/astro-request.test.js
blob: 1156714dd252c52746c2c90e0e0ec245078c094d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { suite } from 'uvu';
import * as assert from 'uvu/assert';
import { doc } from './test-utils.js';
import { setup } from './helpers.js';

const Request = suite('Astro.request');

setup(Request, './fixtures/astro-request');

Request('Astro.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();