mirror of
https://github.com/upgundecha/howtheysre
synced 2026-01-02 23:38:01 +00:00
Quick improvements to test
This commit is contained in:
@@ -8,32 +8,34 @@ var expect = chai.expect;
|
||||
|
||||
const srcMd = fs.readFileSync('README.md', 'utf8');
|
||||
|
||||
describe('Header', function () {
|
||||
it('is intact', function () {
|
||||
expect(srcMd).to.startsWith('# How they SRE');
|
||||
describe('Checklist', function () {
|
||||
describe('Header', function () {
|
||||
it('is intact', function () {
|
||||
expect(srcMd).to.startsWith('# How they SRE');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Section Headers', function () {
|
||||
it('intact', function () {
|
||||
var expectedH2List = [
|
||||
'## Introduction',
|
||||
'## Organizations',
|
||||
'## SRECon Mix Playlist',
|
||||
'## Resources',
|
||||
'## Credits',
|
||||
'## Other How They... repos',
|
||||
'## Contribute',
|
||||
'## License'
|
||||
]
|
||||
var actualList = srcMd.match(/^## (.*$)/gim);
|
||||
expect(expectedH2List).to.equalTo(actualList)
|
||||
describe('Section Headers', function () {
|
||||
it('intact', function () {
|
||||
var expectedH2List = [
|
||||
'## Introduction',
|
||||
'## Organizations',
|
||||
'## SRECon Mix Playlist',
|
||||
'## Resources',
|
||||
'## Credits',
|
||||
'## Other How They... repos',
|
||||
'## Contribute',
|
||||
'## License'
|
||||
]
|
||||
var actualList = srcMd.match(/^## (.*$)/gim);
|
||||
expect(actualList).to.equalTo(expectedH2List)
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Organization list', function () {
|
||||
it('is sorted', function () {
|
||||
var orgList = srcMd.match(/(?<=<summary>)(.*?)(?=<\/summary>)/g);
|
||||
expect(orgList).to.be.sorted(Intl.Collator().compare);
|
||||
describe('Organization list', function () {
|
||||
it('is sorted', function () {
|
||||
var orgList = srcMd.match(/(?<=<summary>)(.*?)(?=<\/summary>)/g);
|
||||
expect(orgList).to.be.sorted(Intl.Collator().compare);
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user