Skip to content

Conversation

@kylebuch8
Copy link
Contributor

Framework Testing

Running all of our unit tests against React and Vue.

What has changed and why

I've added Vue and React as devDependencies so we can make sure our components work in Vue and React. Figuring out how to add Angular proved to be too difficult for the MVP. We'll have to research how to add Angular in the future.

The idea for framework testing ended up being pretty simple. Each test directory now includes the normal HTML tests and we've added Vue and React tests.

WCT.loadSuites([
  'pfe-markdown_test.html',
  'pfe-markdown_react_test.html',
  'pfe-markdown_vue_test.html'
]);

I've also extracted the JavaScript from the original test files so we can reuse the JavaScript tests in the HTML, React, and Vue files.

For each component, the test folder structure should look like this (using pfe-markdown as an example).

test
  - index.html
  - pfe-markdown_react_test.html
  - pfe-markdown_test.html
  - pfe-markdown_test.js
  - pfe-markdown_vue_test.html

Testing instructions

  1. Pull down the branch
  2. npm install
  3. npm test
  4. Make sure all the tests pass

Merging

Please squash when merging and ensure your commit message uses conventional commit formatting.

Be sure to share your updates with the [email protected] mailing list!

@castastrophe castastrophe added the tests Related to testing label Jul 28, 2020
@kylebuch8 kylebuch8 changed the title Framework testing test: framework testing Aug 3, 2020
@kylebuch8 kylebuch8 mentioned this pull request Aug 4, 2020
Copy link
Contributor

@mwcz mwcz left a comment

Choose a reason for hiding this comment

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

Let's Go To Meteor

@kylebuch8 kylebuch8 merged commit c9e3ae4 into master Aug 19, 2020
@kylebuch8 kylebuch8 deleted the framework-testing branch August 19, 2020 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants