mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-15 21:39:00 +00:00
Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
@ -23,10 +23,10 @@ and effective _as well as_ fast.
|
||||
|
||||
Here are some things to keep in mind regarding test performance:
|
||||
|
||||
- `double` and `spy` are faster than `FactoryBot.build(...)`
|
||||
- `instance_double` and `spy` are faster than `FactoryBot.build(...)`
|
||||
- `FactoryBot.build(...)` and `.build_stubbed` are faster than `.create`.
|
||||
- Don't `create` an object when `build`, `build_stubbed`, `attributes_for`,
|
||||
`spy`, or `double` will do. Database persistence is slow!
|
||||
`spy`, or `instance_double` will do. Database persistence is slow!
|
||||
- Don't mark a feature as requiring JavaScript (through `:js` in RSpec) unless it's _actually_ required for the test
|
||||
to be valid. Headless browser testing is slow!
|
||||
|
||||
|
Reference in New Issue
Block a user