diff options
author | Lukas '+ alert('Eipi') + ' Eipert <leipert@gitlab.com> | 2019-08-02 17:38:50 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2019-08-02 17:38:50 +0300 |
commit | fc9f099884f6b98dea3f4e6110ecba6151fa75b8 (patch) | |
tree | 037c50677bea22d8e0b1733f210e08de01e32962 /spec/support | |
parent | 0fec9a4fc7fae7480a92d6402d3ad144b4bd7233 (diff) |
Prevent empty classes in ansi2html conversion
Currently we write out empty CSS classes (`class=""`) every time we
create a new tag. This adds 9 unnecessary bytes per span element. In a
recent trace, I have counted 11950 span elements. So we transported 105
unnecessary kilobytes!
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/ci_trace_shared_examples.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/shared_examples/ci_trace_shared_examples.rb b/spec/support/shared_examples/ci_trace_shared_examples.rb index 6fd4b14d51d..e2b4b50d41d 100644 --- a/spec/support/shared_examples/ci_trace_shared_examples.rb +++ b/spec/support/shared_examples/ci_trace_shared_examples.rb @@ -7,11 +7,11 @@ shared_examples_for 'common trace features' do end it "returns formatted html" do - expect(trace.html).to eq("<span class=\"\">12<br/><span class=\"\">34</span></span>") + expect(trace.html).to eq("<span>12<br/>34</span>") end it "returns last line of formatted html" do - expect(trace.html(last_lines: 1)).to eq("<span class=\"\">34</span>") + expect(trace.html(last_lines: 1)).to eq("<span>34</span>") end end |