Skip to content

Commit ba2dbf1

Browse files
authored
refactor(astro): correct Fixture type signatures in test-utils (#16380)
* refactor(astro): correct Fixture type signatures in test-utils * chore: trigger ci * chore: trigger ci
1 parent 217c5b3 commit ba2dbf1

39 files changed

Lines changed: 61 additions & 61 deletions

packages/astro/test/custom-404-implicit-rerouting.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ for (const caseNumber of [1, 2, 3, 4, 5]) {
2020
let devServer: DevServer;
2121

2222
before(async () => {
23-
await fixture.build({});
23+
await fixture.build();
2424
devServer = await fixture.startDevServer();
2525
});
2626

packages/astro/test/custom-404-injected-from-dep.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Custom 404 with injectRoute from dependency', () => {
1111
root: './fixtures/custom-404-injected-from-dep/',
1212
site: 'http://example.com',
1313
});
14-
await fixture.build({});
14+
await fixture.build();
1515
});
1616

1717
it('Build succeeds', async () => {

packages/astro/test/custom-404-static.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('Custom 404 with Static', () => {
4747

4848
describe('build', () => {
4949
before(async () => {
50-
await fixture.build({});
50+
await fixture.build();
5151
});
5252

5353
it('builds to 404.html', async () => {

packages/astro/test/error-bad-js.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('Errors in JavaScript', () => {
4343

4444
describe('build', () => {
4545
before(async () => {
46-
await fixture.build({});
46+
await fixture.build();
4747
});
4848

4949
it('in nested components, does not crash server', async () => {

packages/astro/test/error-build-location.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe('Errors information in build', () => {
1212

1313
let errorContent: any;
1414
try {
15-
await fixture.build({});
15+
await fixture.build();
1616
} catch (e) {
1717
errorContent = e;
1818
}

packages/astro/test/test-utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ process.env.ASTRO_TELEMETRY_DISABLED = true;
3030
*
3131
*
3232
* @typedef {Object} Fixture
33-
* @property {typeof build} build
33+
* @property {(extraInlineConfig?: Parameters<typeof build>[0], options?: Parameters<typeof build>[1]) => Promise<void>} build
3434
* @property {(url: string) => string} resolveUrl
3535
* @property {(path: string) => Promise<boolean>} pathExists
3636
* @property {(url: string, opts?: Parameters<typeof fetch>[1]) => Promise<Response>} fetch
@@ -39,7 +39,7 @@ process.env.ASTRO_TELEMETRY_DISABLED = true;
3939
* @property {(path: string) => Promise<string[]>} readdir
4040
* @property {(pattern: string) => Promise<string[]>} glob
4141
* @property {(inlineConfig?: Parameters<typeof dev>[0]) => ReturnType<typeof dev>} startDevServer
42-
* @property {typeof preview} preview
42+
* @property {(extraInlineConfig?: Parameters<typeof preview>[0]) => Promise<PreviewServer>} preview
4343
* @property {() => Promise<void>} clean
4444
* @property {(streaming?: boolean) => Promise<App>} loadTestAdapterApp
4545
* @property {(streaming?: boolean) => Promise<App>} loadSelfAdapterApp

packages/integrations/markdoc/test/content-collections.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('Markdoc - Content Collections', () => {
6161

6262
describe('build', () => {
6363
before(async () => {
64-
await baseFixture.build({});
64+
await baseFixture.build();
6565
});
6666

6767
it('loads entry', async () => {

packages/integrations/markdoc/test/content-layer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('Markdoc - Content Layer', () => {
4242

4343
describe('build', () => {
4444
before(async () => {
45-
await fixture.build({});
45+
await fixture.build();
4646
});
4747

4848
it('renders content - with components', async () => {

packages/integrations/markdoc/test/headings.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('Markdoc - Headings', () => {
6363

6464
describe('build', () => {
6565
before(async () => {
66-
await fixture.build({});
66+
await fixture.build();
6767
});
6868

6969
it('applies IDs to headings', async () => {
@@ -142,7 +142,7 @@ describe('Markdoc - Headings with custom Astro renderer', () => {
142142

143143
describe('build', () => {
144144
before(async () => {
145-
await fixture.build({});
145+
await fixture.build();
146146
});
147147

148148
it('applies IDs to headings', async () => {

packages/integrations/markdoc/test/image-assets.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ describe('Markdoc - Image assets', () => {
7676

7777
describe('build', () => {
7878
before(async () => {
79-
await baseFixture.build({});
79+
await baseFixture.build();
8080
});
8181

8282
it('uses public/ image paths unchanged', async () => {

0 commit comments

Comments
 (0)