Skip to content

How can we not use happydom for a test? #6727

Closed Answered by Amatewasu
Amatewasu asked this question in Q&A
Discussion options

You must be logged in to vote

I found a way!

The technique is to unregister the happydom registrator before your tests (and register it back after your tests).

describe('do not run happydom for these tests', () => {
    beforeAll(() => {
    GlobalRegistrator.unregister();
  });

  afterAll(() => {
    GlobalRegistrator.register();
  });

  it('should not use happy dom', () => {
    // ... your test here
   })
});

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Amatewasu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant