Added tests

This commit is contained in:
Unmesh Gundecha
2021-02-21 12:06:03 +08:00
parent c9e1449683
commit 31d5a66084
6 changed files with 864 additions and 1 deletions

18
test/main.spec.js Normal file
View 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`);
});
});
});