-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
pass fixture files through the postHTML transformer code #30681
pass fixture files through the postHTML transformer code #30681
Conversation
a886b65
to
cec9fde
Compare
} | ||
} | ||
|
||
async function integration() { | ||
buildNewServer(); | ||
htmlTransform = require('../server/new-server/transforms/dist/transform') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does this come from? Is it something that buildNewServer()
builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildNewServer()
generates this file from the TypeScript
transforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erwinmombay I just saw this old review comment thread in relation to #32865 (comment). I think this should be moved to server.js
. The integration test runner shouldn't have to worry about server startup logic.
b043349
to
bb0f659
Compare
…cript-transform.ts each module should do 1 thing and 1 thing only. currently the module transformer also did a src/url transformation. this caused weird mismatches when they are ran together. - added looseScriptSrcCheck to allow for non cdn domains. This will allow us to transition from the bad fixture files to having all html files be valid AMP HTML by default.
Co-authored-by: Caroline Liu <[email protected]>
Co-authored-by: Caroline Liu <[email protected]>
bb0f659
to
61e77f5
Compare
61e77f5
to
474c6cb
Compare
@estherkim PTAL |
} | ||
} | ||
|
||
async function integration() { | ||
buildNewServer(); | ||
htmlTransform = require('../server/new-server/transforms/dist/transform') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Use SERVER_TRANSFORM_PATH from typescript-compile.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hope you don't mind ill follow it up in #28336
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@erwinmombay Can we also fix this as part of #32865 (comment)?
…30681) * make it so that src transformation only happens strictly in scripts/script-transform.ts each module should do 1 thing and 1 thing only. currently the module transformer also did a src/url transformation. this caused weird mismatches when they are ran together. - added looseScriptSrcCheck to allow for non cdn domains. This will allow us to transition from the bad fixture files to having all html files be valid AMP HTML by default. * temp * temp * add transform back to integration * fix html * fix integration * temp * temp * make transformers have a loose mode to be more forgiving on script src * add more tests and fix bug for extention retention * allow for mjs files to be served by the test server * add glob to load mjs files in karma server * lint fixes * lint html * break up this PR * fix bad error formatting * apply recs * Update build-system/server/new-server/transforms/transform.ts Co-authored-by: Caroline Liu <[email protected]> * Update build-system/server/new-server/transforms/utilities/option-set.ts Co-authored-by: Caroline Liu <[email protected]> * fix other locations of "FORTESTING" * fix esm and non esm tests to be green * use writeFileSync instead of async method. seems to be a race * guarantee directory exists first * skip failing IE test temporarily * applied recs * temp "only" * dont reroute to max json files * change error to warning * fix max builds and integration tests against max files * revert bad rebase * fix all urls to be valid for js resources * removing debugger * re-run broken IE test Co-authored-by: Caroline Liu <[email protected]>
we want our example and fixture files to be "valid html" files by default on disk, meaning the url's need to point to the cdn and it passes the validator.
For these files to be usable for tests we then need to pass them through our html transformers to change the url's and do modifications such as: