Skip to content

Commit

Permalink
Fixes Seneca-CDOT#83: test case for text-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuong Tran authored and Tuong Tran committed Nov 10, 2019
1 parent 03f90c9 commit f8ae631
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/text-parser.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const textParser = require('../src/text-parser');


/**
* textParser.run() will convert the html to text plain
*/
test('Testing text-parser', () => {
expect(textParser.run('<!DOCTYPE html><p>Hello world</p>')).toBe('Hello world');
});

test('Testing text-parser 2', () => {
expect(textParser.run('<div><p><span>OSD600 Telescope</span></p></div>')).toBe('OSD600 Telescope');
});

0 comments on commit f8ae631

Please sign in to comment.