-
Notifications
You must be signed in to change notification settings - Fork 111
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
adds modifyBabelConfig #235
Conversation
… webpack config assembly; get tests to pass
if (config.debug) { | ||
logger.debug('Merged babel configuration:', mergedBabelrc); | ||
} | ||
return mergedBabelrc; |
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 a misnomer right? There's no actual merging going on.
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.
yeah, maybe modifiedBabelConfig
would be more accurate?
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.
Yea that sounds good
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.
@tizmagik - done
describe('preprocessor', () => { | ||
it('calls the babel utility and babel-jest\'s createTransformer', () => { | ||
const preprocessor = require('../preprocessor'); // eslint-disable-line global-require | ||
expect(preprocessor).toBe(fakeTransformer); |
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.
Isn't this just testing Jest's ability to mock?
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.
ha yeah I suppose, I'll drop this assertion
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.
although, wait, I added it to verify that preprocessor
exports the result of createTransformer
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.
Ah ok gotcha!
}); | ||
expect(babelJest.createTransformer).toBeCalledWith(fakeBabelResult); | ||
}); | ||
}); |
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.
Thanks for adding this test!! 🙏
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.
LGTM!
Can we pause this? I'd like to see how #250 feels first. |
sounds good to me @delambo -- I'll close the PR for now, can always reopen |
fixes #134
adds a
modifyBabelConfig
callback inkyt.config.js