Skip to content
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 Jest setup for unit testing #731

Merged
merged 7 commits into from
Apr 14, 2019
Merged

Conversation

souppower
Copy link
Contributor

Description

Added Jest setup.
For a starter, I added a test for safari detection logic.

components/Editor.js Outdated Show resolved Hide resolved
jest.config.js Outdated
module.exports = {
testEnvironment: 'node',
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/']
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -4,7 +4,7 @@ module.exports = {
browser: true,
es6: true,
node: true,
mocha: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Carbon doesn't use mocha for unit testing.

@@ -0,0 +1,3 @@
{
"presets": ["next/babel"]
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfix22 mfix22 self-requested a review April 14, 2019 18:23
@mfix22 mfix22 force-pushed the unit-test branch 2 times, most recently from 8cccf23 to 63090b7 Compare April 14, 2019 18:29
@mfix22 mfix22 merged commit 36b582c into carbon-app:master Apr 14, 2019
@souppower souppower deleted the unit-test branch April 15, 2019 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants