You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is now being used for a few tests that we are running as well, so we need to implement the same thing.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Leading HTML comments with arguments should properly configure the transformer spec tests.
Implementation brief
Check if the input document starts with an HTML comment.
If yes, fetch the HTML comment and strip it from the input file.
Use json_decode() on the text content of the comment.
The resulting JSON document represents the options that should be passed into the transformer(s).
Note: This might require mapping from Node.js options to PHP options if these are not the same. Alternatively, we might consider adapting the options to keep them in sync with the Node.js version.
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered:
Feature description
The language agnostic spec tests in the
amp-toolbox
package use a leading HTML comment to configure individual tests: https://github.com/ampproject/amp-toolbox/blob/bb242b62266a71c777437d199161ba850ddab53b/packages/optimizer/spec/transformers/valid/AmpBoilerplateTransformer/always_inlines_v0css/input.html#L1-L6This is now being used for a few tests that we are running as well, so we need to implement the same thing.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation brief
json_decode()
on the text content of the comment.Note: This might require mapping from Node.js options to PHP options if these are not the same. Alternatively, we might consider adapting the options to keep them in sync with the Node.js version.
QA testing instructions
Demo
Changelog entry
The text was updated successfully, but these errors were encountered: