mirror of
https://github.com/apsdehal/awesome-ctf
synced 2024-11-21 18:23:01 +00:00
Add base for tests and util lib
This commit is contained in:
parent
c6f61ac4ca
commit
2a3c1f3fde
3 changed files with 30 additions and 3 deletions
|
@ -14,8 +14,9 @@
|
|||
},
|
||||
"bugs": "https://github.com/apsdehal/ctf-tools/issues",
|
||||
"devDependencies": {
|
||||
"mocha": "~2.2.1",
|
||||
"marked": "^0.3.3"
|
||||
"cheerio": "^0.19.0",
|
||||
"marked": "^0.3.3",
|
||||
"mocha": "~2.2.1"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
|
@ -29,5 +30,5 @@
|
|||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"keywords": []
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
var assert = require('assert')
|
||||
utils = require('./utils');
|
||||
|
||||
var $ = utils.getSelectorObject();
|
||||
|
||||
describe('Main module', function () {
|
||||
it('should contain a link for all title', function () {
|
||||
|
||||
});
|
||||
|
||||
it('should be sorted alphabetically', function () {
|
||||
|
||||
});
|
||||
})
|
12
tests/utils.js
Normal file
12
tests/utils.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
var fs = require('fs'),
|
||||
marked = require('marked'),
|
||||
cheerio = require('cheerio');
|
||||
|
||||
module.exports = (function () {
|
||||
return {
|
||||
getSelectorObject: function () {
|
||||
var html = marked(fs.readFileSync('../README.md'));
|
||||
return cheerio.load(html);
|
||||
},
|
||||
}
|
||||
})();
|
Loading…
Reference in a new issue