Writing the DOM with fs
How can I output the entire DOM to a file in a JavaScript test? ...
How can I output the entire DOM to a file in a JavaScript test? ...
Pastures which are subject to overflow should be avoided. All lambs born in April or May should be drenched about August or September following, to be certain of ridding them of worms that may later cause their death. This is output from a tool I built called Veterinary Ipsum. It’s something I’ve created a few times: a Lorem Ipsum generator specific to my company’s business domain. ...
We spent the time writing tests, and yet, a bug survived. Should we just stop writing tests? No, but we should maybe write better tests, and think about them differently. ...
Code coverage, the percentage of your code covered by automated tests, is a metric associated with quality. In this post, I’d like to investigate this association. And pour some cold water on it. ...
The FactoryBot gem, previously known as FactoryGirl, is ubiquitous in Ruby and Ruby on Rails testing. If you aren’t familiar with it, you might be wondering, what’s the point? Wouldn’t it be simpler to just build objects myself? ...
Ruby’s RSpec describe block has two common syntaxes. Which should you use? ...
Today I want to talk about a common technique: disabling failing tests to allow a feature to ship. Maybe sometimes you gotta do it. But long-term I think it causes more problems than it solves. ...
Hard-coded test expectations have many benefits that I’ll explore in this post. ...
Today I got to see the :ExtractRspecLet command from the vim-weefactor plugin. It does what the names suggests, converting this: # spec/model/foobar_spec.rb foo = FactoryGirl.create :foobar To this: # spec/model/foobar_spec.rb let(:foo) { FactoryGirl.create :foobar } It also moved the new let from inside my it block to right underneath my context block. Awesome! h/t Josh Davey and Dillon Hafer
I’ve practiced TDD (Test-Driven-Development) a lot and feel knowledgable about when it’s useful and when it isn’t. In this post, I’d like to summarize what I’ve learned. ...
Don’t miss my next essay
Hear from me immediately when I post: no ads, unsubscribe anytime.