mirror of
https://github.com/apsdehal/awesome-ctf
synced 2024-11-22 10:33:04 +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",
|
"bugs": "https://github.com/apsdehal/ctf-tools/issues",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"mocha": "~2.2.1",
|
"cheerio": "^0.19.0",
|
||||||
"marked": "^0.3.3"
|
"marked": "^0.3.3",
|
||||||
|
"mocha": "~2.2.1"
|
||||||
},
|
},
|
||||||
"licenses": [
|
"licenses": [
|
||||||
{
|
{
|
||||||
|
@ -29,5 +30,5 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "node test.js"
|
"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