From 801248451a4a6f772bbd81b33204d6b4ba7de485 Mon Sep 17 00:00:00 2001 From: Wliu <50Wliu@users.noreply.github.com> Date: Sun, 5 Nov 2017 14:58:11 +0100 Subject: [PATCH] Add a second spec! --- spec/styleguide-spec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/styleguide-spec.js b/spec/styleguide-spec.js index 74f751c..7e7ff0c 100644 --- a/spec/styleguide-spec.js +++ b/spec/styleguide-spec.js @@ -14,5 +14,20 @@ describe('Style Guide', () => { it('opens the style guide', () => { expect(styleGuideView.element.textContent).toContain('Styleguide') }) + + describe('example HTML code blocks', () => { + beforeEach(async () => { + await atom.packages.activatePackage('language-html') + }) + + it('tokenizes HTML code blocks using language-html', () => { + const examples = styleGuideView.element.querySelectorAll('.example-html') + expect(examples.length).toBeGreaterThan(0) + + for (const example of examples) { + expect(example.querySelectorAll('.line .syntax--text.syntax--html.syntax--basic').length).toBeGreaterThan(0) + } + }) + }) }) })