astro/packages/astro/test/astro-generator.test.js
Nate Moore f207c417e0
Add Astro.generator (#4012)
* feat: add generator property and component

* chore: remove `Generator` component

* chore: update generator description

* chore: include generator in examples

* chore: update lockfile

* chore: format

* fix: do not reference core from server runtime

* chore: remove component test

Co-authored-by: Nate Moore <nate@astro.build>
2022-08-08 12:34:05 -05:00

23 lines
551 B
JavaScript

import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
describe('Astro generator', () => {
let fixture;
before(async () => {
fixture = await loadFixture({
root: './fixtures/astro-generator/',
});
await fixture.build();
});
describe('build', () => {
it('Defines Astro.generator', async () => {
const html = await fixture.readFile(`/index.html`);
const $ = cheerio.load(html);
expect($('meta[name="generator"]').attr('content')).to.match(/^Astro v/);
});
});
});