mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
chore: clean
This commit is contained in:
parent
50f736bad4
commit
24888f39e7
4 changed files with 4 additions and 42 deletions
|
@ -3,8 +3,6 @@
|
|||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"astro": "workspace:*",
|
||||
"typescript": "^5.5.4"
|
||||
"astro": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,23 +48,6 @@ process.env.ASTRO_TELEMETRY_DISABLED = true;
|
|||
* @property {typeof check} check
|
||||
* @property {typeof sync} sync
|
||||
* @property {AstroConfig} config
|
||||
*
|
||||
* This function returns an instance of the Check
|
||||
*
|
||||
*
|
||||
* When used in a test suite:
|
||||
* ```js
|
||||
* let fixture = await loadFixture({
|
||||
* root: './fixtures/astro-check-watch/',
|
||||
* });
|
||||
* ```
|
||||
* `opts` will override the options passed to the `AstroChecker`
|
||||
*
|
||||
* ```js
|
||||
* let { check, stop, watch } = fixture.check({
|
||||
* flags: { watch: true },
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
|
||||
/** @type {import('../src/core/logger/core').LogOptions} */
|
||||
|
|
|
@ -28,11 +28,6 @@ const createFixture = async (config = {}) => {
|
|||
return {
|
||||
sync: () => astroFixture.sync({ root: stringRoot, ...config }),
|
||||
build: () => astroFixture.build({ root: stringRoot, ...config }),
|
||||
check: async () => {
|
||||
// TODO: check how this thing works
|
||||
// @ts-ignore
|
||||
return await astroFixture.check({ flags: { root: stringRoot, ...config } });
|
||||
},
|
||||
startDevServer: () => astroFixture.startDevServer({ root: stringRoot, ...config }),
|
||||
/** @param {string} path */
|
||||
fileExists: (path) => {
|
||||
|
@ -150,13 +145,13 @@ describe('experimental.typescript', () => {
|
|||
for (const { outDir, exclude } of dirs) {
|
||||
const fixture = await createFixture({ experimental: { typescript: {} }, outDir });
|
||||
await fixture.sync();
|
||||
const tsconfig = JSON.parse(await fixture.readFile(GENERATED_TSCONFIG_PATH));
|
||||
const raw = await fixture.readFile(GENERATED_TSCONFIG_PATH);
|
||||
const tsconfig = JSON.parse(raw);
|
||||
assert.equal(tsconfig.exclude.includes(exclude), true);
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: check why it fails other tests
|
||||
it.skip('should work in dev', async () => {
|
||||
it('should work in dev', async () => {
|
||||
const fixture = await createFixture({ experimental: { typescript: {} } });
|
||||
try {
|
||||
const devServer = await fixture.startDevServer();
|
||||
|
@ -176,12 +171,4 @@ describe('experimental.typescript', () => {
|
|||
assert.fail();
|
||||
}
|
||||
});
|
||||
|
||||
// TODO: check how check works
|
||||
it.skip('should work with astro check', async () => {
|
||||
const fixture = await createFixture({ experimental: { typescript: {} } });
|
||||
await fixture.build();
|
||||
const res = await fixture.check();
|
||||
console.log({ res });
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2459,15 +2459,9 @@ importers:
|
|||
|
||||
packages/astro/test/fixtures/astro-typescript:
|
||||
dependencies:
|
||||
'@astrojs/check':
|
||||
specifier: ^0.9.3
|
||||
version: 0.9.3(prettier-plugin-astro@0.14.1)(prettier@3.3.3)(typescript@5.5.4)
|
||||
astro:
|
||||
specifier: workspace:*
|
||||
version: link:../../..
|
||||
typescript:
|
||||
specifier: ^5.5.4
|
||||
version: 5.5.4
|
||||
|
||||
packages/astro/test/fixtures/before-hydration:
|
||||
dependencies:
|
||||
|
|
Loading…
Reference in a new issue