forked from Seneca-CDOT/telescope
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes Seneca-CDOT#83: test case for text-parser
- 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.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
}); |