-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Fork Jasmine #3147
Fork Jasmine #3147
Conversation
Generated by 🚫 dangerJS |
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 makes me happy!
packages/jest-jasmine2/src/index.js
Outdated
displayErrors: true, | ||
filename: JASMINE_PATH, | ||
}); | ||
const JASMINE_PATH = require.resolve('./jasmine-2.5.2.js'); |
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 think at this point we can just call it jasmine
and strip 2.5.2
}; | ||
|
||
exports.version = function() { | ||
return '2.5.2-custom'; |
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.
'jasmine-light'
? :)
Let's do it then. |
* Remove unused and unsupported Jasmine features. * Move jasmine to src. * Jasmine is now a beautiful piece of pretty printed code. * Fix up stack trace filtering. * Lint fixes. * More dead code removal. * Call it jasmine-light.
* Remove unused and unsupported Jasmine features. * Move jasmine to src. * Jasmine is now a beautiful piece of pretty printed code. * Fix up stack trace filtering. * Lint fixes. * More dead code removal. * Call it jasmine-light.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This diff removes half of Jasmine's implementation, cleans up the project by pretty-printing it and fixes all lint errors. For the longest time we've had our own fork of Jasmine. Updating Jasmine, even though it is still maintained, doesn't really provide us any value. It is only a tiny part of the Jest testing platform and we aren't using many features of it. Our plan has been to replace Jasmine but realistically the only way this is going to happen is if we rewrite our test-runner in place without breaking changes. This diff is not the first step: over the last year we have incrementally been doing exactly this. We built our own assertion library, asymmetric matchers and spies. This is simply the next step. The remaining pieces of Jasmine are now basically only the actual spec runner and the reporter API. Once we have async reporters (cc @DmitriiAbramov) we can remove Jasmine's reporters entirely and build an adapter API.
Changes:
Removed Features:
Test plan
yarn test
Next Steps (volunteers welcome)
jest-mock
(jest.spyOn etc.) and remove Jasmine's spy system.diaf