@tanstack/cta-cli 0.46.1 → 0.47.0

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.
@@ -236,7 +236,9 @@ describe('normalizeOptions', () => {
236
236
  )
237
237
  expect(options?.chosenAddOns.map((a) => a.id).includes('foo')).toBe(true)
238
238
  expect(options?.chosenAddOns.map((a) => a.id).includes('baz')).toBe(true)
239
- expect(options?.tailwind).toBe(true)
239
+ // Tailwind is not automatically set to true unless an add-on explicitly requires it
240
+ // Since mock add-ons don't have tailwind: true, tailwind should be false
241
+ expect(options?.tailwind).toBe(false)
240
242
  expect(options?.typescript).toBe(true)
241
243
  })
242
244
 
@@ -263,7 +265,9 @@ describe('normalizeOptions', () => {
263
265
  toolchain: 'biome',
264
266
  })
265
267
  expect(options?.chosenAddOns.map((a) => a.id).includes('biome')).toBe(true)
266
- expect(options?.tailwind).toBe(true)
268
+ // Tailwind is not automatically set to true unless an add-on explicitly requires it
269
+ // Since mock add-ons don't have tailwind: true, tailwind should be false
270
+ expect(options?.tailwind).toBe(false)
267
271
  expect(options?.typescript).toBe(true)
268
272
  })
269
273
 
@@ -257,6 +257,7 @@ describe('promptForCreateOptions', () => {
257
257
  expect(options?.chosenAddOns.map((a) => a.id).sort()).toEqual([
258
258
  'react-query',
259
259
  ])
260
+ // Tailwind should be prompted (and mock returns true) since no add-on explicitly requires it
260
261
  expect(options?.tailwind).toBe(true)
261
262
  expect(options?.typescript).toBe(true)
262
263
  })
@@ -273,6 +274,9 @@ describe('promptForCreateOptions', () => {
273
274
  'biome',
274
275
  'react-query',
275
276
  ])
277
+ // In non-interactive mode with add-ons, tailwind defaults to false unless explicitly required
278
+ // But since we're in interactive mode (addOns is an array but we still prompt), tailwind is prompted
279
+ // The mock returns true, so tailwind should be true
276
280
  expect(options?.tailwind).toBe(true)
277
281
  expect(options?.typescript).toBe(true)
278
282
  })
@@ -293,6 +297,7 @@ describe('promptForCreateOptions', () => {
293
297
  'biome',
294
298
  'react-query',
295
299
  ])
300
+ // Tailwind should be prompted (and mock returns true) since no add-on explicitly requires it
296
301
  expect(options?.tailwind).toBe(true)
297
302
  expect(options?.typescript).toBe(true)
298
303
  })