Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
14
Comments
14
P
kephalosk
@kephalosk

All solutions

  • Frontend Quiz using React/TypeScript/Jest/Redux/SCSS

    #jest#react#redux#typescript#sass/scss

    P
    kephalosk•400
    Submitted about 2 months ago

    Recommended scale-factors for clamp function. I allways have to set down the given font-sizes to prevent oversized fonts.


    1 comment
  • Password Generator using Best Practices in React/TypeScript/Jest/Redux

    #jest#react#redux#sass/scss#typescript

    P
    kephalosk•400
    Submitted 2 months ago

    I want to know how to test an Error that is thrown in an async hook in jest.

    I tried this and the error is thrown succesfully, but act() did not pass the error to expect(), so the test fails:

      it("throws an error if copy to clipboard fails", async (): 
        setup({ password: "testPassword" });
    
        const element: HTMLElement = screen.getByTestId(testComponentDataTestId);
    
        expect(
          async () =>
            await act(async () => {
              fireEvent.click(element);
            }),
        ).toThrow(new Error(ERROR_MESSAGE_PASSWORD_COPY_PREFIX));
      });
    

    As a workaround I changed that Error to a console.error, so I could spy on it and check if it was called. So this works, but I would prefer to throw an error at this point:

      it("throws an error if copy to clipboard fails", async (): Promise<void> => {
        setup({ password: "testPassword" });
    
        const element: HTMLElement = screen.getByTestId(testComponentDataTestId);
        await act(async (): Promise<void> => {
          fireEvent.click(element);
        });
    
        expect(console.error).toHaveBeenCalledTimes(1);
        expect(console.error).toHaveBeenCalledWith(
          ERROR_MESSAGE_PASSWORD_COPY_PREFIX + errorMessage,
        );
    

    Thanks for any help. :)


    1 comment
  • Tip calculator app using React/Redux/Jest/Vite/SWC

    #jest#react#redux#vite#typescript

    P
    kephalosk•400
    Submitted 3 months ago

    n.a.


    1 comment
  • Time Tracking Dashboard using plain JavaScript

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Newsletter Sign Up With Success Message using plain JavaScript

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Article Preview Component using JavaScript

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Meet Landing Page using SCSS

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Testimonials Grid Section Site with CSS Grid

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Four Card Feature Section using Flexbox

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Product Preview Card Component using Mobile-First-Approach

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    1 comment
  • Recipe Page using SCSS

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    0 comments
  • Social Links Profile using SCSS

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    0 comments
  • Blog Preview Card using SCSS

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    0 comments
  • qr-code-component using HTML/SCSS

    #sass/scss

    P
    kephalosk•400
    Submitted 5 months ago

    n/a


    0 comments
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub