@@ -3,7 +3,7 @@ import * as gql from "@alloy-js/graphql";
33import { describe , expect , it , beforeEach } from "vitest" ;
44import { ObjectType } from "../../src/components/types/index.js" ;
55import { Tester } from "../test-host.js" ;
6- import { renderComponentToSDL } from "./component- test-utils.js" ;
6+ import { renderToSDL } from "./test-utils.js" ;
77
88describe ( "ObjectType component" , ( ) => {
99 let tester : Awaited < ReturnType < typeof Tester . createInstance > > ;
@@ -16,7 +16,7 @@ describe("ObjectType component", () => {
1616 t . code `model ${ t . model ( "User" ) } { name: string; age: int32; }` ,
1717 ) ;
1818
19- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { User } /> ) ;
19+ const sdl = renderToSDL ( tester . program , < ObjectType type = { User } /> ) ;
2020
2121 expect ( sdl ) . toMatchInlineSnapshot ( `
2222 "type User {
@@ -38,7 +38,7 @@ describe("ObjectType component", () => {
3838 ` ,
3939 ) ;
4040
41- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { Item } /> ) ;
41+ const sdl = renderToSDL ( tester . program , < ObjectType type = { Item } /> ) ;
4242
4343 expect ( sdl ) . toMatchInlineSnapshot ( `
4444 """"A store item"""
@@ -57,7 +57,7 @@ describe("ObjectType component", () => {
5757 t . code `model ${ t . model ( "Profile" ) } { bio?: string; }` ,
5858 ) ;
5959
60- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { Profile } /> ) ;
60+ const sdl = renderToSDL ( tester . program , < ObjectType type = { Profile } /> ) ;
6161
6262 expect ( sdl ) . toMatchInlineSnapshot ( `
6363 "type Profile {
@@ -75,7 +75,7 @@ describe("ObjectType component", () => {
7575 t . code `model ${ t . model ( "Post" ) } { tags: string[]; }` ,
7676 ) ;
7777
78- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { Post } /> ) ;
78+ const sdl = renderToSDL ( tester . program , < ObjectType type = { Post } /> ) ;
7979
8080 expect ( sdl ) . toMatchInlineSnapshot ( `
8181 "type Post {
@@ -98,7 +98,7 @@ describe("ObjectType component", () => {
9898 ` ,
9999 ) ;
100100
101- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { Thing } /> ) ;
101+ const sdl = renderToSDL ( tester . program , < ObjectType type = { Thing } /> ) ;
102102
103103 expect ( sdl ) . toMatchInlineSnapshot ( `
104104 "type Thing {
@@ -123,7 +123,7 @@ describe("ObjectType component", () => {
123123 ` ,
124124 ) ;
125125
126- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { Entry } /> ) ;
126+ const sdl = renderToSDL ( tester . program , < ObjectType type = { Entry } /> ) ;
127127
128128 expect ( sdl ) . toMatchInlineSnapshot ( `
129129 "type Entry {
@@ -149,7 +149,7 @@ describe("ObjectType component", () => {
149149 ) ;
150150
151151 // Register the Node interface in the schema so buildSchema can resolve it
152- const sdl = renderComponentToSDL (
152+ const sdl = renderToSDL (
153153 tester . program ,
154154 < >
155155 < gql . InterfaceType name = "Node" >
@@ -185,7 +185,7 @@ describe("ObjectType component", () => {
185185 ` ,
186186 ) ;
187187
188- const sdl = renderComponentToSDL ( tester . program , < ObjectType type = { Book } /> ) ;
188+ const sdl = renderToSDL ( tester . program , < ObjectType type = { Book } /> ) ;
189189
190190 expect ( sdl ) . toMatchInlineSnapshot ( `
191191 "type Book {
@@ -207,7 +207,7 @@ describe("ObjectType component", () => {
207207 ` ,
208208 ) ;
209209
210- const sdl = renderComponentToSDL (
210+ const sdl = renderToSDL (
211211 tester . program ,
212212 < >
213213 < gql . ObjectType name = "Book" >
@@ -237,7 +237,7 @@ describe("ObjectType component", () => {
237237 const { Empty } = await tester . compile ( t . code `model ${ t . model ( "Empty" ) } {}` ) ;
238238
239239 expect ( ( ) => {
240- renderComponentToSDL ( tester . program , < ObjectType type = { Empty } /> ) ;
240+ renderToSDL ( tester . program , < ObjectType type = { Empty } /> ) ;
241241 } ) . toThrow ( / m u s t d e f i n e f i e l d s / ) ;
242242 } ) ;
243243} ) ;
0 commit comments