From bd259ff53a47d8b32fda66fddd0fd382e410e26c Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Sat, 1 Aug 2020 10:53:29 +0300 Subject: test: disable demo project tests otherwise, node 10 is broken on CI. see jsdom/jsdom#2961 for details. --- demo/src/task-scheduler.spec.ts | 18 ++++++++++++++++-- jest.config.js | 1 - jsdom-workaround.js | 4 ---- 3 files changed, 16 insertions(+), 7 deletions(-) delete mode 100644 jsdom-workaround.js diff --git a/demo/src/task-scheduler.spec.ts b/demo/src/task-scheduler.spec.ts index f5fb4bf..9b3eeff 100644 --- a/demo/src/task-scheduler.spec.ts +++ b/demo/src/task-scheduler.spec.ts @@ -1,11 +1,25 @@ /** - * @jest-environment jsdom + * remove-me @jest-environment jsdom */ /// import { MicroTaskScheduler } from './task-scheduler'; -describe('task-scheduler', () => { +/* + * We're skipping this test due to JSDOM issue: + * https://github.com/jsdom/jsdom/issues/2961 + * + * It should pass on Node >= 12.0, but since the core library + * is expected to run on Node >= 10.0, and this test only applies + * to the demo project, it's better disabling it for now than + * getting false negatives. + * + * When this test is eventually re-enabled, don't forget to remove + * the `remove-me` text at the top of this file to re-enable the + * loading of jsdom. + */ +// eslint-disable-next-line jest/no-disabled-tests +describe.skip('task-scheduler', () => { let taskScheduler: MicroTaskScheduler; let task: jest.Mock; diff --git a/jest.config.js b/jest.config.js index 1172605..e972c2d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,7 +1,6 @@ module.exports = { preset: 'ts-jest', testEnvironment: 'node', - setupFiles: ['./jsdom-workaround.js'], globals: { 'ts-jest': { tsConfig: 'tsconfig.spec.json', diff --git a/jsdom-workaround.js b/jsdom-workaround.js deleted file mode 100644 index 63e15a8..0000000 --- a/jsdom-workaround.js +++ /dev/null @@ -1,4 +0,0 @@ -// Workaround for jsdom issue: https://github.com/jsdom/jsdom/issues/2961 -if (typeof globalThis === 'undefined') { - global.globalThis = global; -} -- cgit v1.2.3