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

Feature: Test refactor (No merge) #763

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

UlisesGascon
Copy link
Member

@UlisesGascon UlisesGascon commented Jun 10, 2019

Please, DO NOT merge it!

This is a working in progress feature. See #759

@silvenon... Let me share with you my approach for this feature.

  • My idea was to add an extra function in app/scripts/main.js that exports a simple '\'Allo \'Allo!' text that is used already in the generator. The idea is to test this text in the several frameworks.
  • I didn't use sub-generators as for most of the frameworks I wasn't able to find one, like Ava. As well I want to add a real test, so the users can really understand how to create tests.
  • The code right now is very raw, I will do a refactor once I have all the pieces together.
  • Jest and Cypress are working as expected.
  • Mocha and Jasmine are quite problematics as I my approach was to use es6 modules, as I did for Cypress or Jest. But I am facing several Babel related issues. I was thinking to add a commonjs version for support mocha and Jamine, until we figure out how to solve the compatilibity with babel.
  • As well I added all the test for cover this feature, note that the skipped ones are related to mocha and Jasmine (not implemented yet)

What do you think?

- Replaced `--test-framework` argument in the initialization for prompts
- Added new responses to global `this`
following the current convention
As requested in #0599cc1a6845800bc0063c30b540b7dbc9fdbeb5
- Added test
- Added tasks and dependencies to generated project
- Added copy tasks to main writing task
- Babel config now supports modules (imp/exp)
-  Added module support in the index.html
-  Added sample function in main.js for future unit testing
- Tests updated
- Babel config now supports modules (imp/exp)
-  Added module support in the index.html
-  Added sample function in main.js for future unit testing
- Tests updated
- Updated generator tests
- Improved combined tests behaviour (e2e + unit) as single task
- Added Jest sample test based in main.js' greetings function
- Updated generator tests
- Added Ava sample test based in main.js' greetings function
😓 Sorry for that!
@UlisesGascon UlisesGascon mentioned this pull request Jun 10, 2019
15 tasks
Base automatically changed from master to main January 24, 2021 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants