Archived
1
0

Move and refactor fs tests

This commit is contained in:
Asher
2019-02-19 14:21:04 -06:00
parent 2889b3fede
commit d80f82ab98
11 changed files with 726 additions and 682 deletions

View File

@ -1,4 +1,4 @@
export * from "./browser/client";
export { ActiveEval } from "./browser/command";
export * from "./browser/evaluate";
export * from "./common/connection";
export * from "./common/util";

View File

@ -80,7 +80,14 @@ export const evaluate = (connection: SendableConnection, message: NewEvalMessage
// tslint:enable no-any
} : undefined,
_Buffer: Buffer,
// When the client is ran from Webpack, it will replace
// __non_webpack_require__ with require, which we then need to provide to
// the sandbox. Since the server might also be using Webpack, we need to set
// it to the non-Webpack version when that's the case. Then we need to also
// provide __non_webpack_require__ for when the client doesn't run through
// Webpack meaning it doesn't get replaced with require (Jest for example).
require: typeof __non_webpack_require__ !== "undefined" ? __non_webpack_require__ : require,
__non_webpack_require__: typeof __non_webpack_require__ !== "undefined" ? __non_webpack_require__ : require,
setTimeout,
setInterval,
clearTimeout,