1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-16 04:04:06 +02:00

Jest testing for slate-react (#4459)

* initial skeleton for jest testing

* run in serial mocha, then jest on slate-react only

* run-s without glob patterns https://github.com/yarnpkg/berry/issues/22

* don't run mocha on slate-react package

* use yarn run instead of run-s
This commit is contained in:
Eric Charles
2021-09-01 23:25:11 +02:00
committed by GitHub
parent e51566ada8
commit d338dcc7ce
5 changed files with 1409 additions and 35 deletions

View File

@@ -9,7 +9,7 @@ describe('slate-react', () => {
describe('Editable', () => {
describe('decorate', () => {
// stub out some DOM stuff to avoid crashes
before(() => {
beforeEach(() => {
const jsdom = new JSDOM()
global.window = jsdom.window
global.document = jsdom.window.document