-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/wizard #8
Feat/wizard #8
Conversation
a6ef998
to
131472c
Compare
src/wizard.test.ts
Outdated
describe('getEntryPointPrompt', () => { | ||
describe('initial value', () => { | ||
it('matches the given document syntax', () => { | ||
const randomString = Math.random().toString(36).substring(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest that we refactor this generator chain to its own utility function, as it's used in a few places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved out to test-utils
and added tests for them
src/wizard.ts
Outdated
} | ||
|
||
export const init = async (): Promise<void> => { | ||
const processDirectory = process.env.INIT_CWD?.split('/').reverse()[0] || '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to consider is that I think INIT_CWD
isn't available by default on Windows systems, which is why it's an optional type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now the much neater const processDirectory = path.parse(process.env.INIT_CWD || '').base
Ticket: #1
Screen.Recording.2022-11-22.at.15.10.54.mov