MCPcopy
hub / github.com/jvilk/BrowserFS / codeAssertThrows

Function codeAssertThrows

test/tests/fs/MountableFileSystem/mounting.ts:8–17  ·  view source on GitHub ↗
(op: Function, assertMsg: string)

Source from the content-addressed store, hash-verified

6import * as BrowserFS from '../../../../src/core/browserfs';
7
8function codeAssertThrows(op: Function, assertMsg: string) {
9 var thrown = false;
10 try {
11 op();
12 } catch (e) {
13 thrown = true;
14 } finally {
15 assert(thrown, assertMsg);
16 }
17}
18
19export default function() {
20 var oldmfs = fs.getRootFS();

Callers 1

mounting.tsFile · 0.85

Calls 1

assertFunction · 0.50

Tested by

no test coverage detected