-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
2,670 additions
and
364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
{ | ||
"env": { | ||
"testing": { | ||
"presets": [ | ||
"es2015" | ||
] | ||
"presets": ["es2015"] | ||
} | ||
}, | ||
"presets": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Setup for Mocha testing. | ||
* This file defines globals, DOM, etc which need to be instantiated prior | ||
* to any tests being run. | ||
*/ | ||
|
||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
const { JSDOM } = require('jsdom'); | ||
|
||
const jsdom = new JSDOM('<!doctype html><html><body></body></html>'); | ||
const { window } = jsdom; | ||
|
||
global.window = window; | ||
global.document = window.document; | ||
|
||
// Mock the global Reveal object | ||
global.Reveal = { | ||
getConfig: () => ({ | ||
'reveal-leap-motion': { | ||
gestureDelay: -15, // Remove delays to simplify tests | ||
pointerColor: '#55cc00', | ||
}, | ||
}), | ||
down: () => {}, | ||
left: () => {}, | ||
right: () => {}, | ||
toggleOverview: () => {}, | ||
up: () => {}, | ||
}; |
Oops, something went wrong.