summaryrefslogtreecommitdiff
path: root/packages/astro/test/debug-component.test.js
diff options
context:
space:
mode:
authorGravatar Matthew Phillips <matthew@matthewphillips.info> 2021-11-19 10:06:31 -0500
committerGravatar GitHub <noreply@github.com> 2021-11-19 10:06:31 -0500
commit4682f8fdce27d0601be01603956908d8384a6ec0 (patch)
treea8a3cfc4c04d2c4189cf1cb7a24920183e908b84 /packages/astro/test/debug-component.test.js
parentdaf3eee575f486eaa8d88e4143de4182de96c43f (diff)
downloadastro-4682f8fdce27d0601be01603956908d8384a6ec0.tar.gz
astro-4682f8fdce27d0601be01603956908d8384a6ec0.tar.zst
astro-4682f8fdce27d0601be01603956908d8384a6ec0.zip
Add Debug tests (#1882)
* Make Debug use the Code component * Use a random port so parallel testing works * some debugging * Skip these tests for now * Dont run these tests on osx
Diffstat (limited to '')
-rw-r--r--packages/astro/test/debug-component.test.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/packages/astro/test/debug-component.test.js b/packages/astro/test/debug-component.test.js
new file mode 100644
index 000000000..31a0ff987
--- /dev/null
+++ b/packages/astro/test/debug-component.test.js
@@ -0,0 +1,29 @@
+import { expect } from 'chai';
+import { loadFixture } from './test-utils.js';
+import os from 'os';
+
+// TODO: fix these tests on macOS
+const isMacOS = os.platform() === 'darwin';
+
+describe('<Debug />', () => {
+ if (isMacOS) return;
+
+ /** @type {import('./test-utils').Fixture} */
+ let fixture
+ /** @type {import('./test-utils').DevServer} */
+ let devServer;
+
+ before(async () => {
+ fixture = await loadFixture({ projectRoot: './fixtures/debug-component/' });
+ devServer = await fixture.startDevServer();
+ });
+
+ after(async () => {
+ devServer && await devServer.stop();
+ });
+
+ it('Works in markdown pages', async () => {
+ const response = await fixture.fetch('/posts/first');
+ expect(response.status).to.equal(200);
+ });
+}); \ No newline at end of file