forked from AhMyth/AhMyth-Android-RAT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtests.js
More file actions
24 lines (21 loc) · 628 Bytes
/
tests.js
File metadata and controls
24 lines (21 loc) · 628 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
var assert = require('assert');
var path = require('path');
var usage = require('./');
var fs = require('fs');
var origFs = fs.readFileSync;
var origMarked = fs.origMarked;
describe('cli-usage', function () {
afterEach(function() {
fs.readFileSync = origFs;
});
describe('get', function () {
it('should get compiled markdown from file input', function () {
var expected = 'expected';
fs.readFileSync = function (filename) {
assert.equal(path.basename(filename), 'file.md');
return expected;
};
assert.ok(usage.get('file.md').indexOf(expected) !== -1);
});
});
});