Skip to content

Commit

Permalink
add sinon in token-parser test
Browse files Browse the repository at this point in the history
  • Loading branch information
nedkelly committed Dec 21, 2018
1 parent 3f705d1 commit ad945c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/tests/unit/lib/token-parser/markdown/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const TwingTestMockBuilderParser = require('../../../../../mock-builder/parser')
const { TwingTokenParserMarkdown } = require("../../../../../../build/lib/token-parser/markdown");

const tap = require('tape');
const sinon = require('sinon');

class ExpressionParser {
parseExpression() {
Expand All @@ -27,6 +28,8 @@ tap.test('token-parser/markdown', function (test) {
let tokenParser = new TwingTokenParserMarkdown();
let parser = TwingTestMockBuilderParser.getParser(stream, new ExpressionParser());

sinon.stub(parser, 'getStream').returns(stream);

tokenParser.setParser(parser);

test.throws(function () {
Expand Down

0 comments on commit ad945c7

Please sign in to comment.