Skip to content

Commit 8bc3fab

Browse files
committed
updates
1 parent d5f7c75 commit 8bc3fab

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

packages/inquirerer/__tests__/defaultFrom.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ describe('Inquirerer - defaultFrom feature', () => {
9898

9999
describe('git resolvers', () => {
100100
it('should use git.user.name as default', async () => {
101-
mockedExecSync.mockReturnValue(Buffer.from('John Doe\n'));
101+
mockedExecSync.mockReturnValue('John Doe\n' as any);
102102

103103
const prompter = new Inquirerer({
104104
input: mockInput,
@@ -124,7 +124,7 @@ describe('Inquirerer - defaultFrom feature', () => {
124124
});
125125

126126
it('should use git.user.email as default', async () => {
127-
mockedExecSync.mockReturnValue(Buffer.from('[email protected]\n'));
127+
mockedExecSync.mockReturnValue('[email protected]\n' as any);
128128

129129
const prompter = new Inquirerer({
130130
input: mockInput,
@@ -176,8 +176,8 @@ describe('Inquirerer - defaultFrom feature', () => {
176176

177177
it('should resolve multiple git fields', async () => {
178178
mockedExecSync
179-
.mockReturnValueOnce(Buffer.from('Jane Smith\n'))
180-
.mockReturnValueOnce(Buffer.from('[email protected]\n'));
179+
.mockReturnValueOnce('Jane Smith\n' as any)
180+
.mockReturnValueOnce('[email protected]\n' as any);
181181

182182
const prompter = new Inquirerer({
183183
input: mockInput,
@@ -337,7 +337,7 @@ describe('Inquirerer - defaultFrom feature', () => {
337337

338338
describe('priority and fallbacks', () => {
339339
it('should prioritize argv over defaultFrom', async () => {
340-
mockedExecSync.mockReturnValue(Buffer.from('Git User\n'));
340+
mockedExecSync.mockReturnValue('Git User\n' as any);
341341

342342
const prompter = new Inquirerer({
343343
input: mockInput,
@@ -384,7 +384,7 @@ describe('Inquirerer - defaultFrom feature', () => {
384384
});
385385

386386
it('should handle mixed defaultFrom and static defaults', async () => {
387-
mockedExecSync.mockReturnValue(Buffer.from('Jane Doe\n'));
387+
mockedExecSync.mockReturnValue('Jane Doe\n' as any);
388388

389389
const prompter = new Inquirerer({
390390
input: mockInput,

packages/inquirerer/__tests__/resolvers.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ describe('Git Resolvers', () => {
163163

164164
describe('getGitConfig', () => {
165165
it('should return git config value when successful', () => {
166-
mockedExecSync.mockReturnValue(Buffer.from('John Doe\n'));
166+
mockedExecSync.mockReturnValue('John Doe\n' as any);
167167

168168
const result = getGitConfig('user.name');
169169

@@ -178,7 +178,7 @@ describe('Git Resolvers', () => {
178178
});
179179

180180
it('should trim whitespace from git config value', () => {
181-
mockedExecSync.mockReturnValue(Buffer.from(' [email protected] \n'));
181+
mockedExecSync.mockReturnValue(' [email protected] \n' as any);
182182

183183
const result = getGitConfig('user.email');
184184

@@ -196,7 +196,7 @@ describe('Git Resolvers', () => {
196196
});
197197

198198
it('should return undefined when git config returns empty string', () => {
199-
mockedExecSync.mockReturnValue(Buffer.from(''));
199+
mockedExecSync.mockReturnValue('' as any);
200200

201201
const result = getGitConfig('user.name');
202202

@@ -206,7 +206,7 @@ describe('Git Resolvers', () => {
206206

207207
describe('git.user.name resolver', () => {
208208
it('should resolve git user name', async () => {
209-
mockedExecSync.mockReturnValue(Buffer.from('Jane Smith\n'));
209+
mockedExecSync.mockReturnValue('Jane Smith\n' as any);
210210

211211
const result = await globalResolverRegistry.resolve('git.user.name');
212212

@@ -226,7 +226,7 @@ describe('Git Resolvers', () => {
226226

227227
describe('git.user.email resolver', () => {
228228
it('should resolve git user email', async () => {
229-
mockedExecSync.mockReturnValue(Buffer.from('[email protected]\n'));
229+
mockedExecSync.mockReturnValue('[email protected]\n' as any);
230230

231231
const result = await globalResolverRegistry.resolve('git.user.email');
232232

0 commit comments

Comments
 (0)