Skip to content

Feature: Test refactor (No merge) #763

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

Draft
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
@JoshuaKGoldberg
Copy link

@UlisesGascon is this still something you're interested in?

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft March 20, 2025 12:32
@silvenon
Copy link
Member

To add to this, @UlisesGascon I just want to apologize, I have no idea how I missed this cool effort of yours! I'd gladly help with the tooling challenges if you'll be interested in continuing this.

Also, pushing for ESM 6 years ago was very progressive of you 😮

@UlisesGascon
Copy link
Member Author

UlisesGascon commented Mar 20, 2025

@UlisesGascon is this still something you're interested in?

I think that depends a lot if we want to keep this generator alive or not. So far seems like the plan is to archive it yeoman/yeoman#1779 but I am open to discuss it specially if the community want to support it :)

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.

3 participants