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
Testing Improvements. #989
Conversation
* Cleanup require hooks in test suite. * Test organization and cleanup. * Remove redundant autotest utilities.
Codecov Report
@@ Coverage Diff @@
## master #989 +/- ##
==========================================
- Coverage 90.46% 90.29% -0.18%
==========================================
Files 309 304 -5
Lines 11478 11473 -5
==========================================
- Hits 10384 10359 -25
- Misses 1094 1114 +20
Continue to review full report at Codecov.
|
1 similar comment
@@ -5,7 +5,7 @@ var markoWidgets = require('marko-widgets'); | |||
describe(path.basename(__dirname), function() { | |||
it('should serialize widget config down to the browser', function() { | |||
|
|||
expect(window.simpleWidgets).to.equal(undefined); | |||
expect(window.simpleWidgets).to.eql([]); |
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.
Why did this change to an empty array?
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.
The tests used to run before the static component code:
marko/test/components-pages/fixtures-deprecated/getRenderedWidgets/components/app-simple/index.js
Line 2 in ecc7763
window.simpleWidgets = []; |
They now run after, but it doesn't change the meaning of the tests. It's still saying the same thing: "expect there to be no simpleWidgets
yet."
@@ -1,5 +1,3 @@ | |||
lasso-page dependencies=data.browserDependencies lasso=data.lasso | |||
|
|||
import Promise from 'promise-polyfill'; |
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.
I notice you upgraded this module. Is it even needed?
I assume it was needed prior to the switch to JSDOM because Phantom didn't support Promises.
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.
Yeah I think you are right. I thought I saw a test that was testing specifically for a poly filled promise but I guess I was wrong. I updated to PR to remove this dependency.
Description
components-browser
tests with hydration.Motivation and Context
Some bugs have been discovered around some hydration edge cases.
To improve the test coverage for hydration we want to have all of the
components-browser
tests run through a hydration step and a browser render step.With the existing setup the process will run out of ram when bundling all of these tests (twice) because of the way lasso is caching things.
This PR has a WIP implementation to run the components browser tests in hydration mode using a new testing technique which removes the need for running browser tests through a bundler in order to run them.
This also makes the tests run much faster.
Screenshots (if appropriate):
Checklist: