From 45e8331e261244628b134a18e3d0fbe0ebb3a7dc Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Mar 2017 20:05:11 +0900 Subject: :sushi: Closes #12, #227 and #58 --- test/text.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/text.js b/test/text.js index e4c72560f0..49e2f02b5d 100644 --- a/test/text.js +++ b/test/text.js @@ -4,8 +4,8 @@ const assert = require('assert'); -const analyze = require('../src/common/text'); -const syntaxhighlighter = require('../src/common/text/core/syntax-highlighter'); +const analyze = require('../built/api/common/text').default; +const syntaxhighlighter = require('../built/api/common/text/core/syntax-highlighter').default; describe('Text', () => { it('is correctly analyzed', () => { @@ -90,6 +90,14 @@ describe('Text', () => { }); describe('syntax highlighting', () => { + it('comment', () => { + const html1 = syntaxhighlighter('// Strawberry pasta'); + assert.equal(html1, '// Strawberry pasta'); + + const html2 = syntaxhighlighter('x // x\ny // y'); + assert.equal(html2, 'x // x\ny // y'); + }); + it('regexp', () => { const html = syntaxhighlighter('/.*/'); assert.equal(html, '/.*/'); -- cgit v1.2.3-freya