Skip to content

Commit 0f8261a

Browse files
committed
Files from previous commit; merge from master
1 parent 8a1ebc3 commit 0f8261a

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

src/storage/Storage-nodespec.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { NodeFileStorage } from './NodeFileStorage';
2+
3+
import { describeStorage } from './Storage-spec';
4+
5+
import * as mockFs from 'mock-fs';
6+
7+
let mockedFs;
8+
9+
let nodeFileStorageFactory = (maxItems?) => {
10+
return new NodeFileStorage('test', './fileStorage', 'ex-', maxItems, mockedFs);
11+
};
12+
13+
let nodeFileStorageInitializer = () => {
14+
mockedFs = mockFs.fs({
15+
'fileStorage': {}
16+
});
17+
};
18+
19+
describeStorage('NodeFileStorage',
20+
nodeFileStorageFactory,
21+
nodeFileStorageInitializer,
22+
true
23+
);

test.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
require.config({
2+
baseUrl: 'node_modules',
3+
paths: {
4+
chai: 'chai/chai',
5+
TraceKit: 'tracekit/tracekit'
6+
}
7+
});
8+
9+
require([
10+
'../dist/temp/exceptionless-browserspec'
11+
], function() {
12+
13+
if (typeof mochaPhantomJS !== "undefined") { mochaPhantomJS.run(); }
14+
else {
15+
16+
console.log('running mocha');
17+
mocha.run();
18+
}
19+
});

testrunner.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<title>Mocha</title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<link rel="stylesheet" href="node_modules/mocha/mocha.css" />
9+
</head>
10+
11+
<body>
12+
<div id="mocha">
13+
<p><a href="?">Index</a></p>
14+
</div>
15+
<div id="messages"></div>
16+
<div id="fixtures"></div>
17+
<script src="node_modules/mocha/mocha.js"></script>
18+
<script>
19+
mocha.setup('bdd');
20+
</script>
21+
<script data-main="test.config.js" src="node_modules/requirejs/require.js"></script>
22+
</body>
23+
</html>

0 commit comments

Comments
 (0)