astro/packages/astro/test/import-ts-with-js.test.js
Matthew Phillips 259a539d7d
Remove legacy.astroFlavoredMarkdown (#5771)
* Remove legacy.astroFlavoredMarkdown

* update vue mdx test

* Add a changeset
2023-01-05 16:20:40 -05:00

19 lines
536 B
JavaScript

import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
describe('Using .js extension on .ts file', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
before(async () => {
fixture = await loadFixture({ root: './fixtures/import-ts-with-js/' });
await fixture.build();
});
it('works in .astro files', async () => {
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);
expect($('h1').text()).to.equal('bar');
});
});