Skip to content

Conversation

@mocca102
Copy link
Contributor

@mocca102 mocca102 commented Jun 6, 2024

  • Add jest tests github actions workflow
  • Add npm dependencies
  • Add jest setup and configuration

@mocca102 mocca102 force-pushed the ci-3559-os-ui-autocomplete-setup-jest-testing-environment branch from 76b70e5 to 2627cec Compare June 13, 2024 18:59
@mocca102 mocca102 force-pushed the ci-3559-os-ui-autocomplete-setup-jest-testing-environment branch from 2627cec to 747e914 Compare June 13, 2024 19:41
@mocca102 mocca102 requested a review from a team June 13, 2024 19:59
Copy link
Contributor

@VincentGalloro VincentGalloro left a comment

Choose a reason for hiding this comment

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

This LGTM, if you want you can get a second 👀 on it

"error"
"error",
{
"trailingComma": "es5"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Linting used to fail but it's not anymore. Removing it

jest.config.js Outdated
{
displayName: 'server',
testEnvironment: 'node',
testMatch: ['**/**/*.server.test.(js|jsx)'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we care about ts/tsx file here?

@@ -0,0 +1,8 @@
class IntersectionObserver {
Copy link
Contributor

Choose a reason for hiding this comment

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

We have failOnConsole on the Quizzes UI equivalent of this file. I don't think we have to have it but it might be useful?
https://github.com/Constructor-io/constructorio-ui-quizzes/blob/main/jest.setup.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you I didn't know I needed this but it will make testing easier for the other PR. Adding it

@@ -0,0 +1,20 @@
import React from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a big deal but why jsx and not tsx?

Copy link
Contributor

@esezen esezen left a comment

Choose a reason for hiding this comment

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

LGTM!

@mocca102 mocca102 merged commit db1a09b into main Jul 3, 2024
@mocca102 mocca102 deleted the ci-3559-os-ui-autocomplete-setup-jest-testing-environment branch July 3, 2024 13:54
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.

4 participants