/describe-jsdom

Primary LanguageJavaScriptMIT LicenseMIT

describe-jsdom

Build Status

this:

require('describe-jsdom');

describe.jsdom('my thing', function () {
  //your stuff...
});

turns into this:

describe('my thing', function () {
  let cleanup;

  beforeEach(function () {
    cleanup = require('jsdom-global')();
  });

  //your stuff...

  afterEach(function () {
    cleanup();
  });
});

that is all.

need to pass special config to jsdom-global? then use the longer form as shown above :P

installing

available via npm:

$ npm install --save-dev describe-jsdom