chore: remove unused code

This commit is contained in:
Ayo 2022-09-27 17:38:12 +02:00
parent 1444086b14
commit 13394c99af
2 changed files with 0 additions and 31 deletions

View file

@ -1,7 +0,0 @@
# `test` directory
This folder contain tests for your component(s). This templates makes no assumption regarding your way of writting code. You can either write the code first and then the tests or the reverse (known as Test-Driven Development). Ultimately, what's important is that your code works and is tested to prove it!
Included in this template is [astro-component-tester](https://github.com/Princesseuh/astro-component-tester), a tool made to help you test the output of your component(s), check out its GitHub page for more info on how to use it
A commented example test (see `example.test.js`) is included in this folder to help you learn how to write a basic test for your project

View file

@ -1,24 +0,0 @@
import { expect } from 'chai';
import { getComponentOutput } from 'astro-component-tester';
describe('Example Tests', () => {
// Simple test to get us started with the syntax
it('should equal 2', () => {
expect(1 + 1).to.equal(2);
});
// This show us how to write a test for our component's output using astro-component-tester
describe('Component test', async () => {
let component;
// First get the component's output, this returns an object containing the generated html (`.html`)
before(async () => {
component = await getComponentOutput('./src/Component.astro');
});
// Unless you modified /src/Component.astro, this should pass, as the component is empty apart from the frontmatter and new lines
it('example component should be empty', () => {
expect(component.html).to.equal('\n');
});
});
});