-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes solid * Rename the test * Rebase with next * Skip solid test for now
- Loading branch information
Showing
6 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/astro/test/fixtures/solid-component/src/components/Hello.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { createSignal } from 'solid-js'; | ||
|
||
export default function Counter() { | ||
const [count] = createSignal(0); | ||
|
||
return ( | ||
<> | ||
<div class="hello">Hello world - {count}</div> | ||
</> | ||
); | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/astro/test/fixtures/solid-component/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
import Hello from '../components/Hello.jsx'; | ||
--- | ||
<html> | ||
<head><title>Solid</title></head> | ||
<body> | ||
<div><Hello /></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { expect } from 'chai'; | ||
import cheerio from 'cheerio'; | ||
import { loadFixture } from './test-utils.js'; | ||
|
||
describe.skip('Solid component', () => { | ||
let fixture; | ||
|
||
before(async () => { | ||
fixture = await loadFixture({ | ||
projectRoot: './fixtures/solid-component/', | ||
renderers: ['@astrojs/renderer-solid'], | ||
}); | ||
await fixture.build(); | ||
}); | ||
|
||
it('Can load a component', async () => { | ||
const html = await fixture.readFile('/index.html'); | ||
const $ = cheerio.load(html); | ||
|
||
// test 1: Works | ||
expect($('.hello')).to.have.lengthOf(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters