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

fix: es6 syntax in client #1982

Merged
merged 1 commit into from
Jun 6, 2019
Merged

fix: es6 syntax in client #1982

merged 1 commit into from
Jun 6, 2019

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Jun 6, 2019

  • This is a bugfix
  • This is a feature
  • This is a code refactor
  • This is a test update
  • This is a docs update
  • This is a metadata update

For Bugs and Features; did you add new tests?

no, it is critical fix, test will be in future

Motivation / Use-Case

fixes #1981

Breaking Changes

No

Additional Info

/cc @hiroppy @Loonride I am temporary block merge any PRs before we refactor tests/tests strcuture/structure inside lib (for any branches)

Please don't touch next branch before we do this in master

@alexander-akait
Copy link
Member Author

alexander-akait commented Jun 6, 2019

Test structure (approximately):

- test
  - e2e
  - cli
  - client
    - clients
      - SockJSClient.test.js 
    - overlay.test.js 
  - server
    - servers
      - SockJSServer.test.js
    - utils
      - tryParseInt.test.js

Test naming:

  1. class tests have same name as class -> MyClass.js -> MyClass.test.js
  2. pure file like defaultPort.js -> defaultPort.test.js
  3. options for server should be placed in server directory and have name compress-option.test.js
  4. options for client should be placed in client directory and have name sockPath-options.test.js

Next we should improve test performance, many tests are very long and written in effective way.

Some of tests files should be merge in other, some of separated based on above structure.

I am WIP on this after merge this PR

@@ -4,7 +4,7 @@ const testServer = require('../helpers/test-server');
const config = require('../fixtures/provide-plugin-config/webpack.config');
const runBrowser = require('../helpers/run-browser');

describe('ProvidePlugin', () => {
describe.skip('ProvidePlugin', () => {
Copy link
Member Author

Choose a reason for hiding this comment

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

Need rewrite tests

@codecov
Copy link

codecov bot commented Jun 6, 2019

Codecov Report

Merging #1982 into master will decrease coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1982     +/-   ##
=========================================
- Coverage   92.47%   92.27%   -0.2%     
=========================================
  Files          28       28             
  Lines        1076     1075      -1     
  Branches      322      322             
=========================================
- Hits          995      992      -3     
- Misses         77       79      +2     
  Partials        4        4
Impacted Files Coverage Δ
client-src/clients/BaseClient.js 33.33% <ø> (ø)
client-src/clients/SockJSClient.js 86.66% <ø> (ø)
lib/utils/updateCompiler.js 100% <ø> (ø) ⬆️

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 d8d1808...d13878d. Read the comment docs.

@alexander-akait alexander-akait mentioned this pull request Jun 6, 2019
@alexander-akait
Copy link
Member Author

Merge without review because it is critical, feel free to feedback

@alexander-akait alexander-akait merged commit 802aa30 into master Jun 6, 2019
@alexander-akait alexander-akait deleted the issue-1981 branch June 6, 2019 14:26
@hiroppy
Copy link
Member

hiroppy commented Jun 6, 2019

I would like to separate utils tests. Utils shouldn't have to test through the server. It is e2e.

@alexander-akait
Copy link
Member Author

@hiroppy yes, utils should have own unit tests and in Server.test.js we should do integration test (example - check when we run server configuration has HotModuleReplacmentPlugin and etc)

@alexander-akait
Copy link
Member Author

@hiroppy #1983

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[critical] webpack-dev-server broken in old browsers
2 participants