mirror of
https://github.com/upgundecha/howtheysre
synced 2026-01-02 23:38:01 +00:00
Added tests
This commit is contained in:
18
test/main.spec.js
Normal file
18
test/main.spec.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const fs = require('fs');
|
||||
const { assert } = require('chai');
|
||||
|
||||
const srcMd = fs.readFileSync('README.md', 'utf8');
|
||||
|
||||
describe('Header', function() {
|
||||
it('Starts with #', function() {
|
||||
assert.isOk(srcMd.startsWith('# How they SRE'), 'Header is broken');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Sections', function() {
|
||||
['Introduction', 'Organizations', 'Resources', 'Credits', 'Contribute', 'License'] .forEach(function (section) {
|
||||
it(`${section}`, function() {
|
||||
assert.isOk(srcMd.includes(`## ${section}`), `${section} section is missing`);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user