Skip to content

Commit df3d44c

Browse files
author
Christopher J. Brody
committed
cleanup: use prompt helper for Android package id
(internal prompt helper function) and update test snapshots ref:pr #25
1 parent d7c0387 commit df3d44c

File tree

5 files changed

+41
-34
lines changed

5 files changed

+41
-34
lines changed

main.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,10 @@ Promise.resolve().then(async () => {
183183

184184
const { androidPackageId } =
185185
platforms.indexOf('android') !== -1
186-
? await prompts({
186+
? await prompt({
187187
type: 'text',
188188
name: 'androidPackageId',
189189
message: 'What is the desired Android package id?',
190-
onState,
191190
initial: 'com.demo',
192191
validate: androidPackageId => androidPackageId.length > 0
193192
})

tests/init-with-example/__snapshots__/init-with-example-with-log.test.js.snap

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,16 @@ Array [
122122
},
123123
Object {
124124
"prompts": Object {
125-
"args": Object {
126-
"initial": "com.demo",
127-
"message": "What is the desired Android package id?",
128-
"name": "androidPackageId",
129-
"onState": [Function],
130-
"type": "text",
131-
"validate": [Function],
132-
},
125+
"args": Array [
126+
Object {
127+
"initial": "com.demo",
128+
"message": "What is the desired Android package id?",
129+
"name": "androidPackageId",
130+
"onState": [Function],
131+
"type": "text",
132+
"validate": [Function],
133+
},
134+
],
133135
},
134136
},
135137
Object {

tests/no-example/__snapshots__/no-example-with-log.test.js.snap

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,16 @@ Array [
122122
},
123123
Object {
124124
"prompts": Object {
125-
"args": Object {
126-
"initial": "com.demo",
127-
"message": "What is the desired Android package id?",
128-
"name": "androidPackageId",
129-
"onState": [Function],
130-
"type": "text",
131-
"validate": [Function],
132-
},
125+
"args": Array [
126+
Object {
127+
"initial": "com.demo",
128+
"message": "What is the desired Android package id?",
129+
"name": "androidPackageId",
130+
"onState": [Function],
131+
"type": "text",
132+
"validate": [Function],
133+
},
134+
],
133135
},
134136
},
135137
Object {

tests/view/no-example/__snapshots__/init-view-no-example-with-log.test.js.snap

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,16 @@ Array [
135135
},
136136
Object {
137137
"prompts": Object {
138-
"args": Object {
139-
"initial": "com.demo",
140-
"message": "What is the desired Android package id?",
141-
"name": "androidPackageId",
142-
"onState": [Function],
143-
"type": "text",
144-
"validate": [Function],
145-
},
138+
"args": Array [
139+
Object {
140+
"initial": "com.demo",
141+
"message": "What is the desired Android package id?",
142+
"name": "androidPackageId",
143+
"onState": [Function],
144+
"type": "text",
145+
"validate": [Function],
146+
},
147+
],
146148
},
147149
},
148150
Object {

tests/view/with-example/__snapshots__/init-view-with-example-with-log.test.js.snap

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,16 @@ Array [
135135
},
136136
Object {
137137
"prompts": Object {
138-
"args": Object {
139-
"initial": "com.demo",
140-
"message": "What is the desired Android package id?",
141-
"name": "androidPackageId",
142-
"onState": [Function],
143-
"type": "text",
144-
"validate": [Function],
145-
},
138+
"args": Array [
139+
Object {
140+
"initial": "com.demo",
141+
"message": "What is the desired Android package id?",
142+
"name": "androidPackageId",
143+
"onState": [Function],
144+
"type": "text",
145+
"validate": [Function],
146+
},
147+
],
146148
},
147149
},
148150
Object {

0 commit comments

Comments
 (0)