-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.js
35 lines (28 loc) · 818 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var chai = require('chai');
var expect = chai.expect;
var match = require('syntaxhighlighter-match');
var Brush = require('./brush');
var sample = require('fs').readFileSync('./sample.txt', 'utf8');
describe('brush-yaml', function() {
var instance = null;
before(function() {
instance = new Brush();
});
it('has populated code sample', function() {
expect(sample).to.not.match(/^Populate/);
});
describe('instance', function() {
it('has `regexList`', function() {
expect(instance).to.have.property('regexList');
});
});
describe('parsing', function() {
var matches = null;
before(function() {
matches = match.applyRegexList(sample, instance.regexList);
});
it('can parse', function() {
expect(matches).to.have.length.above(0);
});
});
});