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

Update dependencies and spec tests - 2020-02-03 #56

Merged
merged 6 commits into from
Feb 4, 2021

Conversation

schlessera
Copy link
Collaborator

This PR updates the spec tests imported from the Node.JS toolbox and either fixes or ignores test breakage.

Follow-up issues for ignored tests:

@schlessera schlessera added Bug Something isn't working Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs SSR Related to the serverside rendering of the Optimizer labels Feb 3, 2021
@schlessera schlessera added this to the 0.2.0 milestone Feb 3, 2021
@codecov
Copy link

codecov bot commented Feb 3, 2021

Codecov Report

Merging #56 (ac4edbd) into main (60f6d0c) will decrease coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##               main      #56      +/-   ##
============================================
- Coverage     78.40%   78.27%   -0.13%     
- Complexity      854      858       +4     
============================================
  Files            47       47              
  Lines          2139     2145       +6     
============================================
+ Hits           1677     1679       +2     
- Misses          462      466       +4     
Flag Coverage Δ Complexity Δ
php 78.27% <100.00%> (-0.13%) 0.00 <6.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
src/Optimizer/Transformer/PreloadHeroImage.php 89.95% <100.00%> (-1.88%) 89.00 <0.00> (ø)
src/Optimizer/Transformer/ServerSideRendering.php 84.77% <100.00%> (+0.23%) 143.00 <6.00> (+4.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf04487...2072f35. Read the comment docs.

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

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

LGTM

return true;
}

if ($parent->tagName === Tag::SCRIPT && $parent->hasAttribute(Attribute::TEMPLATE)) {
Copy link
Member

Choose a reason for hiding this comment

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

Technically this could also check if $parent->getAttribute('type') === 'text/plain':

Suggested change
if ($parent->tagName === Tag::SCRIPT && $parent->hasAttribute(Attribute::TEMPLATE)) {
if ($parent->tagName === Tag::SCRIPT && $parent->hasAttribute(Attribute::TEMPLATE) && $parent->getAttribute('type') === 'text/plain') {

But that would be somewhat overkill since template implies type=text/plain

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I think that would not add any benefit, but only add additional overhead and maybe even create false negatives in the worst case.

@schlessera schlessera merged commit fa871fc into main Feb 4, 2021
@schlessera schlessera deleted the update-spec-tests-2020-02-03 branch February 4, 2021 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working SSR Related to the serverside rendering of the Optimizer Testing Issues related with Unit, E2E, Smoke, and other testing requirements/needs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants