Skip to content

Commit

Permalink
adds test
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbrokke committed Feb 14, 2016
1 parent ed09291 commit 974a384
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@ var assert = require('assert');
var TokenReplacer = require('../index.js');

describe('TokenReplacer', function() {
describe('#constructor', function() {
it('should accept starting and ending tokens', function() {
var startToken = '[%';
var endToken = '%]';

var options = {
endToken: endToken,
startToken: startToken
};

var replacer = new TokenReplacer(options);

var tokenString = '[%first%]';

assert.notEqual(tokenString, replacer.processString(tokenString));
});
});

describe('#processString()', function() {
var replacer = null;

Expand Down

0 comments on commit 974a384

Please sign in to comment.