@typespec/emitter-framework 0.9.0-dev.6 → 0.9.0-dev.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/dist/src/core/components/output.d.ts +4 -4
  2. package/dist/src/core/components/output.d.ts.map +1 -1
  3. package/dist/src/core/components/output.js +3 -3
  4. package/dist/src/core/context/name-policy-context.d.ts +2 -2
  5. package/dist/src/core/context/name-policy-context.d.ts.map +1 -1
  6. package/dist/src/core/context/tsp-context.d.ts +2 -2
  7. package/dist/src/core/context/tsp-context.d.ts.map +1 -1
  8. package/dist/src/core/transport-name-policy.d.ts +1 -1
  9. package/dist/src/core/transport-name-policy.d.ts.map +1 -1
  10. package/dist/src/core/write-output.d.ts +2 -2
  11. package/dist/src/core/write-output.d.ts.map +1 -1
  12. package/dist/src/csharp/components/class/declaration.d.ts +3 -3
  13. package/dist/src/csharp/components/class/declaration.d.ts.map +1 -1
  14. package/dist/src/csharp/components/class/declaration.js +2 -2
  15. package/dist/src/csharp/components/class/declaration.test.js +100 -115
  16. package/dist/src/csharp/components/{enum-declaration.d.ts → enum/declaration.d.ts} +4 -4
  17. package/dist/src/csharp/components/enum/declaration.d.ts.map +1 -0
  18. package/dist/src/csharp/components/{enum-declaration.js → enum/declaration.js} +6 -6
  19. package/dist/src/csharp/components/enum/declaration.test.d.ts +2 -0
  20. package/dist/src/csharp/components/enum/declaration.test.d.ts.map +1 -0
  21. package/dist/src/csharp/components/enum/declaration.test.js +309 -0
  22. package/dist/src/csharp/components/index.d.ts +1 -1
  23. package/dist/src/csharp/components/index.js +1 -1
  24. package/dist/src/csharp/components/property/property.d.ts +2 -2
  25. package/dist/src/csharp/components/property/property.d.ts.map +1 -1
  26. package/dist/src/csharp/components/property/property.test.js +14 -14
  27. package/dist/src/csharp/components/type-expression.d.ts +3 -3
  28. package/dist/src/csharp/components/type-expression.d.ts.map +1 -1
  29. package/dist/src/csharp/components/utils/doc-comments.d.ts +4 -4
  30. package/dist/src/csharp/components/utils/doc-comments.d.ts.map +1 -1
  31. package/dist/src/csharp/components/utils/doc-comments.js +2 -2
  32. package/dist/src/testing/index.d.ts +1 -1
  33. package/dist/src/testing/index.d.ts.map +1 -1
  34. package/dist/src/testing/scenario-test/harness.d.ts +2 -2
  35. package/dist/src/testing/scenario-test/harness.d.ts.map +1 -1
  36. package/dist/src/testing/scenario-test/test-host.d.ts +2 -2
  37. package/dist/src/testing/scenario-test/test-host.d.ts.map +1 -1
  38. package/dist/src/typescript/components/array-expression.d.ts +2 -3
  39. package/dist/src/typescript/components/array-expression.d.ts.map +1 -1
  40. package/dist/src/typescript/components/array-expression.js +2 -2
  41. package/dist/src/typescript/components/arrow-function.d.ts +1 -1
  42. package/dist/src/typescript/components/arrow-function.d.ts.map +1 -1
  43. package/dist/src/typescript/components/class-method.d.ts +1 -1
  44. package/dist/src/typescript/components/class-method.d.ts.map +1 -1
  45. package/dist/src/typescript/components/enum-declaration.d.ts +6 -6
  46. package/dist/src/typescript/components/enum-declaration.d.ts.map +1 -1
  47. package/dist/src/typescript/components/enum-declaration.js +2 -2
  48. package/dist/src/typescript/components/function-declaration.d.ts +1 -1
  49. package/dist/src/typescript/components/function-declaration.d.ts.map +1 -1
  50. package/dist/src/typescript/components/function-expression.d.ts +1 -1
  51. package/dist/src/typescript/components/function-expression.d.ts.map +1 -1
  52. package/dist/src/typescript/components/function-type.d.ts +1 -1
  53. package/dist/src/typescript/components/function-type.d.ts.map +1 -1
  54. package/dist/src/typescript/components/interface-declaration.d.ts +4 -4
  55. package/dist/src/typescript/components/interface-declaration.d.ts.map +1 -1
  56. package/dist/src/typescript/components/interface-declaration.js +3 -4
  57. package/dist/src/typescript/components/interface-member.d.ts +2 -2
  58. package/dist/src/typescript/components/interface-member.d.ts.map +1 -1
  59. package/dist/src/typescript/components/interface-method.d.ts +2 -2
  60. package/dist/src/typescript/components/interface-method.d.ts.map +1 -1
  61. package/dist/src/typescript/components/record-expression.d.ts +1 -1
  62. package/dist/src/typescript/components/record-expression.d.ts.map +1 -1
  63. package/dist/src/typescript/components/type-alias-declaration.d.ts +1 -1
  64. package/dist/src/typescript/components/type-alias-declaration.d.ts.map +1 -1
  65. package/dist/src/typescript/components/type-declaration.d.ts +1 -1
  66. package/dist/src/typescript/components/type-declaration.d.ts.map +1 -1
  67. package/dist/src/typescript/components/type-expression.d.ts +1 -1
  68. package/dist/src/typescript/components/type-expression.d.ts.map +1 -1
  69. package/dist/src/typescript/components/type-transform.d.ts +2 -2
  70. package/dist/src/typescript/components/type-transform.d.ts.map +1 -1
  71. package/dist/src/typescript/components/union-declaration.d.ts +2 -2
  72. package/dist/src/typescript/components/union-declaration.d.ts.map +1 -1
  73. package/dist/src/typescript/components/union-expression.d.ts +3 -4
  74. package/dist/src/typescript/components/union-expression.d.ts.map +1 -1
  75. package/dist/src/typescript/components/union-expression.js +3 -3
  76. package/dist/src/typescript/components/value-expression.d.ts +2 -2
  77. package/dist/src/typescript/components/value-expression.d.ts.map +1 -1
  78. package/dist/src/typescript/utils/operation.d.ts +2 -2
  79. package/dist/src/typescript/utils/operation.d.ts.map +1 -1
  80. package/dist/test/typescript/components/member-expression.test.js +5 -5
  81. package/dist/test/typescript/test-host.d.ts +1 -1
  82. package/dist/test/typescript/test-host.d.ts.map +1 -1
  83. package/dist/test/utils.d.ts +2 -2
  84. package/dist/test/utils.d.ts.map +1 -1
  85. package/package.json +7 -4
  86. package/src/core/components/output.tsx +9 -5
  87. package/src/core/context/name-policy-context.ts +2 -2
  88. package/src/core/context/tsp-context.ts +2 -2
  89. package/src/core/transport-name-policy.ts +1 -1
  90. package/src/core/write-output.ts +2 -2
  91. package/src/csharp/components/class/declaration.test.tsx +107 -169
  92. package/src/csharp/components/class/declaration.tsx +8 -8
  93. package/src/csharp/components/enum/declaration.test.tsx +267 -0
  94. package/src/csharp/components/{enum-declaration.tsx → enum/declaration.tsx} +9 -9
  95. package/src/csharp/components/index.ts +1 -1
  96. package/src/csharp/components/property/property.test.tsx +16 -16
  97. package/src/csharp/components/property/property.tsx +2 -2
  98. package/src/csharp/components/type-expression.test.tsx +3 -3
  99. package/src/csharp/components/type-expression.tsx +3 -3
  100. package/src/csharp/components/utils/doc-comments.tsx +6 -6
  101. package/src/testing/index.ts +1 -1
  102. package/src/testing/scenario-test/harness.ts +2 -2
  103. package/src/testing/scenario-test/test-host.ts +4 -4
  104. package/src/typescript/components/array-expression.tsx +3 -3
  105. package/src/typescript/components/arrow-function.tsx +1 -1
  106. package/src/typescript/components/class-method.tsx +1 -1
  107. package/src/typescript/components/enum-declaration.tsx +6 -6
  108. package/src/typescript/components/function-declaration.tsx +1 -1
  109. package/src/typescript/components/function-expression.tsx +1 -1
  110. package/src/typescript/components/function-type.tsx +1 -1
  111. package/src/typescript/components/interface-declaration.tsx +11 -12
  112. package/src/typescript/components/interface-member.tsx +2 -2
  113. package/src/typescript/components/interface-method.tsx +2 -2
  114. package/src/typescript/components/record-expression.tsx +1 -1
  115. package/src/typescript/components/type-alias-declaration.tsx +1 -1
  116. package/src/typescript/components/type-declaration.tsx +1 -1
  117. package/src/typescript/components/type-expression.tsx +2 -2
  118. package/src/typescript/components/type-transform.tsx +3 -3
  119. package/src/typescript/components/union-declaration.tsx +2 -2
  120. package/src/typescript/components/union-expression.tsx +12 -7
  121. package/src/typescript/components/value-expression.tsx +2 -2
  122. package/src/typescript/utils/operation.ts +2 -2
  123. package/test/testing/snippet-extractor-csharp.test.ts +1 -1
  124. package/test/testing/snippet-extractor-java.test.ts +1 -1
  125. package/test/testing/snippet-extractor-python.test.ts +1 -1
  126. package/test/testing/snippet-extractor-typescript.test.ts +1 -1
  127. package/test/typescript/components/arrow-function.test.tsx +2 -2
  128. package/test/typescript/components/enum-declaration.test.tsx +1 -1
  129. package/test/typescript/components/function-declaration.test.tsx +1 -1
  130. package/test/typescript/components/function-expression.test.tsx +2 -2
  131. package/test/typescript/components/function-type.test.tsx +2 -2
  132. package/test/typescript/components/interface-declaration.test.tsx +1 -1
  133. package/test/typescript/components/interface-method.test.tsx +2 -2
  134. package/test/typescript/components/member-expression.test.tsx +10 -10
  135. package/test/typescript/components/type-alias-declaration.test.tsx +1 -1
  136. package/test/typescript/components/type-transform.test.tsx +2 -2
  137. package/test/typescript/components/union-declaration.test.tsx +2 -2
  138. package/test/typescript/components/value-expression.test.tsx +6 -6
  139. package/test/typescript/test-host.ts +1 -1
  140. package/test/utils.ts +2 -2
  141. package/tsconfig.json +1 -0
  142. package/dist/src/csharp/components/enum-declaration.d.ts.map +0 -1
  143. package/dist/test/csharp/components/enum-declaration.test.d.ts +0 -2
  144. package/dist/test/csharp/components/enum-declaration.test.d.ts.map +0 -1
  145. package/dist/test/csharp/components/enum-declaration.test.js +0 -403
  146. package/dist/test/csharp/test-host.d.ts +0 -11
  147. package/dist/test/csharp/test-host.d.ts.map +0 -1
  148. package/dist/test/csharp/test-host.js +0 -32
  149. package/dist/test/csharp/utils.d.ts +0 -3
  150. package/dist/test/csharp/utils.d.ts.map +0 -1
  151. package/dist/test/csharp/utils.js +0 -6
  152. package/test/csharp/components/enum-declaration.test.tsx +0 -337
  153. package/test/csharp/test-host.ts +0 -42
  154. package/test/csharp/utils.ts +0 -8
@@ -1,403 +0,0 @@
1
- import { createComponent as _$createComponent, createIntrinsic as _$createIntrinsic } from "@alloy-js/core/jsx-runtime";
2
- import { render } from "@alloy-js/core";
3
- import { d } from "@alloy-js/core/testing";
4
- import * as cs from "@alloy-js/csharp";
5
- import { Namespace, SourceFile } from "@alloy-js/csharp";
6
- import { beforeEach, it } from "vitest";
7
- import { Output } from "../../../src/core/index.js";
8
- import { EnumDeclaration } from "../../../src/csharp/index.js";
9
- import { createEmitterFrameworkTestRunner } from "../test-host.js";
10
- import { assertFileContents } from "../utils.js";
11
- let runner;
12
- beforeEach(async () => {
13
- runner = await createEmitterFrameworkTestRunner();
14
- });
15
- it("renders a basic enum declaration", async () => {
16
- const {
17
- TestEnum
18
- } = await runner.compile(`
19
- @test enum TestEnum {
20
- Value1;
21
- Value2;
22
- Value3;
23
- }
24
- `);
25
- const res = render(_$createComponent(Output, {
26
- get program() {
27
- return runner.program;
28
- },
29
- get children() {
30
- return _$createComponent(Namespace, {
31
- name: "TestNamespace",
32
- get children() {
33
- return _$createComponent(SourceFile, {
34
- path: "test.cs",
35
- get children() {
36
- return _$createComponent(EnumDeclaration, {
37
- type: TestEnum
38
- });
39
- }
40
- });
41
- }
42
- });
43
- }
44
- }));
45
- assertFileContents(res, d`
46
- namespace TestNamespace
47
- {
48
- enum TestEnum
49
- {
50
- Value1,
51
- Value2,
52
- Value3
53
- }
54
- }
55
- `);
56
- });
57
- it("renders an empty enum declaration", async () => {
58
- const {
59
- TestEnum
60
- } = await runner.compile(`
61
- @test enum TestEnum {}
62
- `);
63
- const res = render(_$createComponent(Output, {
64
- get program() {
65
- return runner.program;
66
- },
67
- get children() {
68
- return _$createComponent(Namespace, {
69
- name: "TestNamespace",
70
- get children() {
71
- return _$createComponent(SourceFile, {
72
- path: "test.cs",
73
- get children() {
74
- return _$createComponent(EnumDeclaration, {
75
- type: TestEnum
76
- });
77
- }
78
- });
79
- }
80
- });
81
- }
82
- }));
83
- assertFileContents(res, d`
84
- namespace TestNamespace
85
- {
86
- enum TestEnum
87
- {
88
-
89
- }
90
- }
91
- `);
92
- });
93
- it("can override enum name", async () => {
94
- const {
95
- TestEnum
96
- } = await runner.compile(`
97
- @test enum TestEnum {
98
- Value1;
99
- Value2;
100
- }
101
- `);
102
- const res = render(_$createComponent(Output, {
103
- get program() {
104
- return runner.program;
105
- },
106
- get children() {
107
- return _$createComponent(Namespace, {
108
- name: "TestNamespace",
109
- get children() {
110
- return _$createComponent(SourceFile, {
111
- path: "test.cs",
112
- get children() {
113
- return _$createComponent(EnumDeclaration, {
114
- type: TestEnum,
115
- name: "CustomEnumName"
116
- });
117
- }
118
- });
119
- }
120
- });
121
- }
122
- }));
123
- assertFileContents(res, d`
124
- namespace TestNamespace
125
- {
126
- enum CustomEnumName
127
- {
128
- Value1,
129
- Value2
130
- }
131
- }
132
- `);
133
- });
134
- it("renders an enum with access modifiers", async () => {
135
- const {
136
- TestEnum
137
- } = await runner.compile(`
138
- @test enum TestEnum {
139
- Value1;
140
- Value2;
141
- }
142
- `);
143
- const res = render(_$createComponent(Output, {
144
- get program() {
145
- return runner.program;
146
- },
147
- get children() {
148
- return _$createComponent(Namespace, {
149
- name: "TestNamespace",
150
- get children() {
151
- return _$createComponent(SourceFile, {
152
- path: "test.cs",
153
- get children() {
154
- return _$createComponent(EnumDeclaration, {
155
- type: TestEnum,
156
- internal: true
157
- });
158
- }
159
- });
160
- }
161
- });
162
- }
163
- }));
164
- assertFileContents(res, d`
165
- namespace TestNamespace
166
- {
167
- internal enum TestEnum
168
- {
169
- Value1,
170
- Value2
171
- }
172
- }
173
- `);
174
- });
175
- it("renders enum with C# naming conventions", async () => {
176
- const {
177
- TestEnum
178
- } = await runner.compile(`
179
- @test enum TestEnum {
180
- value_one;
181
- value_two;
182
- value_three;
183
- }
184
- `);
185
- const res = render(_$createComponent(Output, {
186
- get program() {
187
- return runner.program;
188
- },
189
- get namePolicy() {
190
- return cs.createCSharpNamePolicy();
191
- },
192
- get children() {
193
- return _$createComponent(Namespace, {
194
- name: "TestNamespace",
195
- get children() {
196
- return _$createComponent(SourceFile, {
197
- path: "test.cs",
198
- get children() {
199
- return _$createComponent(EnumDeclaration, {
200
- type: TestEnum
201
- });
202
- }
203
- });
204
- }
205
- });
206
- }
207
- }));
208
- assertFileContents(res, d`
209
- namespace TestNamespace
210
- {
211
- enum TestEnum
212
- {
213
- ValueOne,
214
- ValueTwo,
215
- ValueThree
216
- }
217
- }
218
- `);
219
- });
220
- it("renders enum with single value", async () => {
221
- const {
222
- TestEnum
223
- } = await runner.compile(`
224
- @test enum TestEnum {
225
- OnlyValue;
226
- }
227
- `);
228
- const res = render(_$createComponent(Output, {
229
- get program() {
230
- return runner.program;
231
- },
232
- get children() {
233
- return _$createComponent(Namespace, {
234
- name: "TestNamespace",
235
- get children() {
236
- return _$createComponent(SourceFile, {
237
- path: "test.cs",
238
- get children() {
239
- return _$createComponent(EnumDeclaration, {
240
- type: TestEnum
241
- });
242
- }
243
- });
244
- }
245
- });
246
- }
247
- }));
248
- assertFileContents(res, d`
249
- namespace TestNamespace
250
- {
251
- enum TestEnum
252
- {
253
- OnlyValue
254
- }
255
- }
256
- `);
257
- });
258
- it("renders enum with numeric-like member names", async () => {
259
- const {
260
- TestEnum
261
- } = await runner.compile(`
262
- @test enum TestEnum {
263
- Value0;
264
- Value1;
265
- Value10;
266
- Value100;
267
- }
268
- `);
269
- const res = render(_$createComponent(Output, {
270
- get program() {
271
- return runner.program;
272
- },
273
- get children() {
274
- return _$createComponent(Namespace, {
275
- name: "TestNamespace",
276
- get children() {
277
- return _$createComponent(SourceFile, {
278
- path: "test.cs",
279
- get children() {
280
- return _$createComponent(EnumDeclaration, {
281
- type: TestEnum
282
- });
283
- }
284
- });
285
- }
286
- });
287
- }
288
- }));
289
- assertFileContents(res, d`
290
- namespace TestNamespace
291
- {
292
- enum TestEnum
293
- {
294
- Value0,
295
- Value1,
296
- Value10,
297
- Value100
298
- }
299
- }
300
- `);
301
- });
302
- it("renders multiple enums in the same namespace", async () => {
303
- const {
304
- TestEnum1,
305
- TestEnum2
306
- } = await runner.compile(`
307
- @test enum TestEnum1 {
308
- Value1;
309
- Value2;
310
- }
311
- @test enum TestEnum2 {
312
- OptionA;
313
- OptionB;
314
- OptionC;
315
- }
316
- `);
317
- const res = render(_$createComponent(Output, {
318
- get program() {
319
- return runner.program;
320
- },
321
- get children() {
322
- return _$createComponent(Namespace, {
323
- name: "TestNamespace",
324
- get children() {
325
- return _$createComponent(SourceFile, {
326
- path: "test.cs",
327
- get children() {
328
- return [_$createComponent(EnumDeclaration, {
329
- type: TestEnum1
330
- }), _$createIntrinsic("hbr", {}), _$createComponent(EnumDeclaration, {
331
- type: TestEnum2
332
- })];
333
- }
334
- });
335
- }
336
- });
337
- }
338
- }));
339
- assertFileContents(res, d`
340
- namespace TestNamespace
341
- {
342
- enum TestEnum1
343
- {
344
- Value1,
345
- Value2
346
- }
347
- enum TestEnum2
348
- {
349
- OptionA,
350
- OptionB,
351
- OptionC
352
- }
353
- }
354
- `);
355
- });
356
- it("renders an enum with doc comments", async () => {
357
- const {
358
- TestEnum
359
- } = await runner.compile(`
360
- @test enum TestEnum {
361
- @doc("This is value one")
362
- Value1;
363
- /** This is value two */
364
- Value2;
365
- }
366
- `);
367
- const res = render(_$createComponent(Output, {
368
- get program() {
369
- return runner.program;
370
- },
371
- get children() {
372
- return _$createComponent(Namespace, {
373
- name: "TestNamespace",
374
- get children() {
375
- return _$createComponent(SourceFile, {
376
- path: "test.cs",
377
- get children() {
378
- return _$createComponent(EnumDeclaration, {
379
- type: TestEnum
380
- });
381
- }
382
- });
383
- }
384
- });
385
- }
386
- }));
387
- assertFileContents(res, d`
388
- namespace TestNamespace
389
- {
390
- enum TestEnum
391
- {
392
- /// <summary>
393
- /// This is value one
394
- /// </summary>
395
- Value1,
396
- /// <summary>
397
- /// This is value two
398
- /// </summary>
399
- Value2
400
- }
401
- }
402
- `);
403
- });
@@ -1,11 +0,0 @@
1
- import { Program } from "@typespec/compiler";
2
- export declare function createTypespecCliTestHost(options?: {
3
- libraries: "Http"[];
4
- }): Promise<import("@typespec/compiler/testing").TestHost>;
5
- export declare function createEmitterFrameworkTestRunner(options?: {
6
- autoUsings?: string[];
7
- }): Promise<import("@typespec/compiler/testing").BasicTestRunner>;
8
- export declare function getProgram(code: string, options?: {
9
- libraries: "Http"[];
10
- }): Promise<Program>;
11
- //# sourceMappingURL=test-host.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-host.d.ts","sourceRoot":"","sources":["../../../test/csharp/test-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAS7C,wBAAsB,yBAAyB,CAC7C,OAAO,GAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAsB,0DASrD;AAED,wBAAsB,gCAAgC,CAAC,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;CAAO,iEAK7F;AAED,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAsB,GACnD,OAAO,CAAC,OAAO,CAAC,CAUlB"}
@@ -1,32 +0,0 @@
1
- import { createTestHost, createTestWrapper, expectDiagnosticEmpty } from "@typespec/compiler/testing";
2
- import { HttpTestLibrary } from "@typespec/http/testing";
3
- export async function createTypespecCliTestHost(options = {
4
- libraries: []
5
- }) {
6
- const libraries = [];
7
- if (options.libraries.includes("Http")) {
8
- libraries.push(HttpTestLibrary);
9
- }
10
- return createTestHost({
11
- libraries
12
- });
13
- }
14
- export async function createEmitterFrameworkTestRunner(options = {}) {
15
- const host = await createTypespecCliTestHost();
16
- return createTestWrapper(host, {
17
- autoUsings: options.autoUsings
18
- });
19
- }
20
- export async function getProgram(code, options = {
21
- libraries: []
22
- }) {
23
- const host = await createTypespecCliTestHost(options);
24
- const wrapper = createTestWrapper(host, {
25
- compilerOptions: {
26
- noEmit: true
27
- }
28
- });
29
- const [_, diagnostics] = await wrapper.compileAndDiagnose(code);
30
- expectDiagnosticEmpty(diagnostics);
31
- return wrapper.program;
32
- }
@@ -1,3 +0,0 @@
1
- import { OutputDirectory } from "@alloy-js/core";
2
- export declare function assertFileContents(res: OutputDirectory, contents: string): void;
3
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../test/csharp/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,QAIxE"}
@@ -1,6 +0,0 @@
1
- import { assert } from "vitest";
2
- export function assertFileContents(res, contents) {
3
- const testFile = res.contents.find(file => file.path === "test.cs");
4
- assert(testFile, "test.cs file not rendered");
5
- assert.equal(testFile.contents, contents);
6
- }