-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add camelCase util function and use in test-helpers #32
Add camelCase util function and use in test-helpers #32
Conversation
Also added a couple of items to .gitignore for my own dev environment |
test/unit/utils.test.js
Outdated
@@ -74,4 +74,14 @@ describe("Utils", function() { | |||
|
|||
}); | |||
|
|||
describe('jQuery camelCase (private method)', () => { |
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.
These quotes should use " to pass linting rules
test/test-helpers.js
Outdated
@@ -21,7 +21,7 @@ const { JSDOM } = jsdom; | |||
*/ | |||
function renderComponent(name, data) { | |||
var template = fs.readFileSync(path.join(__dirname, `../src/components/${ name }/${ name }.njk`), "utf8"); | |||
return nunjucks.renderString(`${ template}{{ ${ name }(content) }}"`, { content: data }); | |||
return nunjucks.renderString(`${ template}{{ ${ $.camelCase(name) }(content) }}"`, { content: data }); |
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.
Can you remove the extra double quotes?
Test helper nunjucks render function presumed that a file's macro would match the file name - replaced with a camelCase template name
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.
Nice!
No description provided.