Files
howtheysre/test/main.spec.js
Unmesh Gundecha 31d5a66084 Added tests
2021-02-21 12:06:03 +08:00

18 lines
560 B
JavaScript

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`);
});
});
});