GithubHelp home page GithubHelp logo

Add unit tests about mailgo HOT 8 CLOSED

gianantoniopini avatar gianantoniopini commented on June 2, 2024
Add unit tests

from mailgo.

Comments (8)

gianantoniopini avatar gianantoniopini commented on June 2, 2024 1

@manzinello No problem, I will check this.

from mailgo.

manzinello avatar manzinello commented on June 2, 2024

I would be willing to work on this and submit a PR. For example I could start writing some unit tests for the mailgoDirectRender and mailgoValidateEmail functions, using Typescript and the React Testing Library.

I think that it is a very important point, thank you!

Would this be a welcome addition?

Absolutely yes! Proceed with the PR when you want, thank you so much!

from mailgo.

gianantoniopini avatar gianantoniopini commented on June 2, 2024

Ok, I will start looking into this. Thanks.

from mailgo.

manzinello avatar manzinello commented on June 2, 2024

Hi @gianantoniopini, it seems that there is something that isn't working properly with tests (window and document). I've just updated the dependencies. I'm sorry and I can't work on this at the moment, can you help me? https://github.com/manzinello/mailgo/actions/runs/895410024 Otherwise I will go in depth with this problem as soon as I can. Thank you so much

from mailgo.

manzinello avatar manzinello commented on June 2, 2024

Thank you so much!

from mailgo.

gianantoniopini avatar gianantoniopini commented on June 2, 2024

The issue was related to the update of Jest to version 27. In this new version of Jest the default test environment has been changed from "jsdom" to "node". See this https://jestjs.io/blog/2021/05/25/jest-27#flipping-defaults .
We were affected by this change because we use the DOM APIs and did not have the test environment explicitly configured. So I have configured "testEnvironment": "jsdom" in the jest.config.js file.

I will create a PR for this change.

from mailgo.

manzinello avatar manzinello commented on June 2, 2024

Thank you!

from mailgo.

gianantoniopini avatar gianantoniopini commented on June 2, 2024

You are welcome :-)

from mailgo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.