Replace beforeEach with just a cleanLocalstorage call

The rest isn't needed anymore.
This commit is contained in:
Travis Ralston 2020-01-15 14:06:24 -07:00
parent 3c9c0ec447
commit e37da08730
2 changed files with 3 additions and 24 deletions

View file

@ -1,30 +1,7 @@
"use strict";
/**
* Perform common actions before each test case, e.g. printing the test case
* name to stdout.
* @param {Mocha.Context} context The test context
*/
export function beforeEach(context) {
const desc = context.currentTest.fullTitle();
console.log();
console.log(desc);
console.log(new Array(1 + desc.length).join("="));
// some tests store things in localstorage. Improve independence of tests
// by making sure that they don't inherit any old state.
export function cleanLocalstorage() {
window.localStorage.clear();
}
/**
* returns true if the current environment supports webrtc
*/
export function browserSupportsWebRTC() {
const n = global.window.navigator;
return n.getUserMedia || n.webkitGetUserMedia ||
n.mozGetUserMedia;
}
export function deleteIndexedDB(dbName) {
return new Promise((resolve, reject) => {
if (!window.indexedDB) {