mirror of
https://github.com/m3y54m/Embedded-Engineering-Roadmap.git
synced 2026-10-12 17:28:30 +03:00
feat(explorer): show embedded system definitions on the landing panel and as a topic
This commit is contained in:
@@ -16,7 +16,7 @@ test('builds the topic tree from the README headings', () => {
|
||||
assert.equal(find('1-Wire').parent.title, 'Basic Protocols');
|
||||
assert.equal(find('High-Performance Computing (HPC)').parent.title, 'Multithreading & Parallel Processing');
|
||||
assert.equal(find('History'), undefined);
|
||||
assert.deepEqual(data.groups.map((g) => g.title), ["Don't Know Where to Start!", 'Learning Resources']);
|
||||
assert.deepEqual(data.groups.map((g) => g.title), ['What is an Embedded System?', "Don't Know Where to Start!", 'Learning Resources']);
|
||||
});
|
||||
|
||||
test('gives every topic a unique slug', () => {
|
||||
@@ -38,6 +38,17 @@ test('keeps descriptions and the README introduction', () => {
|
||||
assert.match(find('Microcontrollers').description[0].text, /^Microcontrollers are integrated circuits/);
|
||||
});
|
||||
|
||||
test('parses sourced quotations as quote blocks and resources', () => {
|
||||
const defs = find('Embedded System Definitions');
|
||||
const quotes = defs.description.filter((b) => b.type === 'quote');
|
||||
assert.equal(quotes.length, 5);
|
||||
assert.equal(quotes[0].source, 'ISO/IEC/IEEE 24765 Standard');
|
||||
assert.equal(quotes[0].paragraphs.length, 2);
|
||||
assert.match(quotes[0].paragraphs[0], /rapid transit system\.$/, 'a lazy continuation line joins its paragraph');
|
||||
assert.deepEqual(defs.resources.map((r) => r.title).slice(0, 2), ['ISO/IEC/IEEE 24765 Standard', '"Making Embedded Systems" Book']);
|
||||
assert.equal(data.root.description.some((b) => b.type === 'quote'), false, 'README callouts are not quotations');
|
||||
});
|
||||
|
||||
test('links topics that share a resource or mention each other', () => {
|
||||
assert.ok(linked(find('Docker'), find('CI/CD Pipelines')).shared.length > 0);
|
||||
assert.ok(linked(find('I2C'), find('Sensors')).mentions.length > 0);
|
||||
|
||||
Reference in New Issue
Block a user